in reply to Re: Vexing views of variables
in thread Vexing views of variables
sub { $v } would normally be a no-op, but, here, it's the last line statement of a function definition, so it carries an implicit return. Thus, mk_view_v() returns that anonymous sub, and we call it as we would any other coderef.
UPDATE: I should have said that the sub { $v } line carries 2 implicit returns—more explicitly, it's return sub { return $v }.
|
|---|