|Welcome to the Monastery|
Problem to inspect scalars in STASHby LanX (Canon)
|on Feb 15, 2012 at 04:14 UTC||Need Help??|
LanX has asked for the
wisdom of the Perl Monks concerning the following question:
I'm trying to inspect the symbols of a package and filter which arrays, hashes, scalars and subs where used.
This works pretty fine for all slots of a glob but for scalars!
Normally unused slots are undef or hold a reference to the corresponding type. (see ARRAYs)
But unused scalar slots automatically hold \undef which is not distinguishable from using them and setting them to undef.
Any idea how to solve this?