> The solution I came up with is to use defined($$name) for scalars,
Sorry, that's not a solution because it excludes all declared package variables which became undef in the meantime.
Think of something like $flag = () in the middle of the code. I'm trying to fix the tab-expansion in the perldebugger, actually $f#TAB# lists all symbols starting with f, no matter which slot is used.
DB<223> sub flo {} => 0 DB<224> $f # type TAB $f $find $flag $flo
As a workaround I could include all symbols where only the scalar slot is defined, but if someone decides to have equally named sub &flo AND scalar $flo where the latter is undef, I can't tell if the scalar belongs to the code or not.
While this cases seems rare enough - most people tend to use different names for different sigils - it's not a 100% solution.
If there is no better suggestion, I will need to parse the code to reliably find all scalars.
>Yes, this is annoying,
FWIW I consider this behavior a bug.
Cheers Rolf
In reply to Re^2: Problem to inspect scalars in STASH
by LanX
in thread Problem to inspect scalars in STASH
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |