"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
In reply to Re^2: PadWalker's closed_over - but for our variables?
by LanX
in thread PadWalker's closed_over - but for our variables?
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |