I was not aware that I am changing semantic of "anywhere" sub to "define before use" variable with local!
There's nothing magical about the = in local *func = sub { ... }; or my $func = sub { ... };. It's an assignment like any other. You can't fetch the value from a variable before you assign the value to the variable. Or as the case is here, before you even create the variable.
In reply to Re^10: Closures and undefined subs
by ikegami
in thread Closures and undefined subs
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |