in reply to Re: Why is it uninitialized?
in thread Why is it uninitialized?
Except the effect of local also applies to the called subroutines,as shown by the our version. perlsub says:
A local modifies its listed variables to be "local" to the enclosing block, eval, or do FILE --and to any subroutine called from within that block. A local just gives temporary values to global (meaning package)So while local is supposed to work across calls to subroutines, it's also supposed to work on variables which are present in the symbols table. I wouldn't expect a closure to keep the name of the variable, or whatever is used to make the localization work
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Why is it uninitialized?
by Laurent_R (Canon) on Dec 20, 2017 at 22:14 UTC | |
by Eily (Monsignor) on Dec 21, 2017 at 09:15 UTC |