On Wed Dec 17 09:17:16 2014, wolfsage@gmail.com wrote:
Show quoted text> Right now, find_symbol() will not return 'my' variables from packages.
>
> It would be wonderful if there was a method that *did* do this.
In summary; that's not doable: lexical variables exist per scope (i.e. per PAD), not globally.
You could iterate *all* of the PADs and find all of the lexicals of some given name, but common names like '$self' are likely to find hundreds if not thousands of hits.
It's unclear from the request what's required here, but for example if you already know what function to be looking in, then you can just inspect PADs of the CODE directly by using the ->lexvars method.
--
Paul Evans