in reply to Re^9: Closures and undefined subs
in thread Closures and undefined subs
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.
|
|---|