The scope in which the variable exists ceases to exist long before the function was called. The function definitely references an out-of-scope variable.Yes. What's your point here? I don't think I claimed the function doesn't.
Let me requote doug:
Any block that creates scoped variables is a closure in my book.And the block discussed here is the following posted by rovf:
Or are you going to retract your retraction about the outer block being a closure?{ # closure starts here my $shared_variable; sub ref_test1 { ... } sub ref_test2 { ... } }
You seem to think nesting a named sub is the same as nesting blocksWhere did you get that idea from? Why does that even matter in my argument with doug that a closure is something else than just a block giving scope to a variable?
In reply to Re^10: Unable to declare local variable with "use strict".
by JavaFan
in thread Unable to declare local variable with "use strict".
by mr_p
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |