There's more than one way to do things | |
PerlMonks |
Re^2: Accessing module variablesby LanX (Saint) |
on Apr 19, 2018 at 17:07 UTC ( [id://1213180]=note: print w/replies, xml ) | Need Help?? |
Some code for introspection. Used strict to demonstrate clean approaches
> Well you could inspect the package stash(es) instead of using eval. *
> Another approach without eval is using symbolic refs, you need to locally no strict 'refs'; for that.
Cheers Rolf
*) NB: you could also avoid the main:: stash and hardcode
if ABC is static in your code.
In Section
Seekers of Perl Wisdom
|
|