in reply to Informations about Padwalker
Variables declared with my are private to the lexical scope they're declared in. For example...
sub foo { my $x = 123; bar(); } sub bar { # bar cannot access variable $x } foo();
PadWalker allows the bar sub to peek and poke at foo's private variables.
Why is it called PadWalker? Because internally the memory structures used by Perl to keep track of lexically declared variables are called "pads". PadWalker lets you "walk" up the call stack visiting other pads.
Using PadWalker is nearly always an incredibly bad idea. Nearly always.
|
|---|