in reply to trouble with packages/eval/variable-scoping
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)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: trouble with packages/eval/variable-scoping
by Ratazong (Monsignor) on Aug 29, 2024 at 12:19 UTC | |
by ikegami (Patriarch) on Aug 29, 2024 at 15:29 UTC | |
by LanX (Saint) on Aug 29, 2024 at 16:11 UTC | |
by ikegami (Patriarch) on Aug 29, 2024 at 17:00 UTC |