Hence it's not in the closure of loadP and the dynamic eval can't find it.
That's how Perl decides to populate the so called variable (Scratch)Pad of a sub at compile time. ¹
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
¹) see also PadWalker
²) see Re^2: trouble with packages/eval/variable-scoping (caller's scope)
In reply to Re: trouble with packages/eval/variable-scoping
by LanX
in thread trouble with packages/eval/variable-scoping
by Ratazong
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |