in reply to Re: PadWalker's closed_over - but for our variables?
in thread PadWalker's closed_over - but for our variables?
"Lexical" describes the scope not how they are stored (private vs package)
The docs are confused here.
> can't be accessed from the caller,
one still needs to know the package of an our-variable to access it
> Or do you just want to get a list of all the variables that a coderef accesses?
I need to introspect a coderef for the package vars used inside, you are right that it might not matter if they were declared outside with our.
As already mentioned: PadWalker offers peek_our but only usable from the inside.
so I effectively need peek_sub for package vars
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: PadWalker's closed_over - but for our variables?
by haukex (Archbishop) on Apr 03, 2021 at 16:42 UTC | |
by ikegami (Patriarch) on Apr 04, 2021 at 05:38 UTC | |
by LanX (Saint) on Apr 05, 2021 at 15:37 UTC | |
by ikegami (Patriarch) on Apr 05, 2021 at 21:59 UTC | |
by LanX (Saint) on Apr 05, 2021 at 22:01 UTC | |
| |
by LanX (Saint) on Apr 03, 2021 at 16:55 UTC | |
by haukex (Archbishop) on Apr 03, 2021 at 17:09 UTC | |
by LanX (Saint) on Apr 03, 2021 at 18:19 UTC |