I apologize for not giving more background. I was afraid of boring and burying people in too much detail.

But yes, you are correct. Although I think of this as something interesting and useful in of itself, my particular interest is in adding to the %DB::subs hash that information that it would normally get if debugging were set up initially.

When one uses Enbugger or manages to call a debugger inside a running program that wasn't set for debugging at the outset, it is desirable to reconstruct the structures, possibly on demand, that would have been gathered if Perl were set to debug at the outset.

It's possible jjore will beef up Enbugger to add this information. And if he does, I have no doubt that he'll do a better or more thorough job than the approaches suggested here so far. But on the other hand, it would be good to explore and have other possibilities to create the information on demand too.


In reply to Re^3: How to get line ranges of subroutines from Perl source code by rockyb
in thread How to get line ranges of subroutines from Perl source code by rockyb

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.