in reply to Re^4: Finding file level lexical variables
in thread Finding file level lexical variables
You are using peek_my(0) , the file scope variables are from the outer scope but never used, so they are not really integrated in the pad and should be already destroyed at the time of your printing. (By ref counting, but digging in memory might still show the old content)
PadWalker is reading internals in unofficial ways and can't be more intelligent as their structures. Always be prudent about side effects.
Anyway, the case of the OP is easily solved with peek_my(1)
If I were you I'd do the introspection and analysis in the sub before any destruction can have happened! Do not return references.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Finding file level lexical variables
by johndeighan (Novice) on May 26, 2016 at 13:04 UTC | |
by LanX (Saint) on May 26, 2016 at 13:16 UTC | |
by johndeighan (Novice) on May 26, 2016 at 14:06 UTC | |
by LanX (Saint) on May 26, 2016 at 14:13 UTC | |
by johndeighan (Novice) on May 26, 2016 at 15:02 UTC | |
|