Thanks for your help... :)

> 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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.