in reply to Lexical pad / attribute confusion
If my understanding of Elian's explanations in Perl Internals - references and symbol table is correct, the reason is because %foo and %bar are just bare blocks, and as such do not get their own pads. Rather, they share the pad of the enclosing sub, which is that of the package, and therefore the INIT block can see them as well when peek_my inspects the package's pad.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Lexical pad / attribute confusion
by adrianh (Chancellor) on Dec 21, 2002 at 23:58 UTC | |
by shotgunefx (Parson) on Dec 22, 2002 at 00:00 UTC | |
by adrianh (Chancellor) on Dec 22, 2002 at 00:08 UTC | |
by shotgunefx (Parson) on Dec 22, 2002 at 01:04 UTC | |
by adrianh (Chancellor) on Dec 22, 2002 at 01:19 UTC | |
|