Think of it like this. When running a debugger, your debugger is running but the input program isn't running. Your debugger has to transfer all those variables by interpreting the source code (or evaluating it or whatever) to either your own symbol table or, it seems from your code, to the debugging program's own symbol table. Let us suppose it does so by evaluating the code with eval. It just so happens that if you take my test code and put an eval around the pattern matching, it reproduces the problem you have exactly, i.e. those special variables stay unaffected by the code.

If eval is at the core of your debugger then this needs to be enhanced so that each line of code is extended before being eval'd to specifically capture the values of those variables within the source symbol space and putting them somewhere the debugging program get at them afterwards, e.g. using IPC::Shareable or IPC::ShareLite - update: although it might slow your debugger down to have too much overhead per line of source - the only way to get better performance and be in full control of the debugger would be to parse instead of eval-ing the source code. .

-M

Free your mind


In reply to Re^5: Getting Special Perl Variables for last Regexp from Debugger by Moron
in thread Getting Special Perl Variables for last Regexp from Debugger by Outaspace

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.