I think it's great to see people daring to dive into the unplumbed depths of perl5db.pl. Few who have ventured there remained sane enough to describe their experiences afterwards.

I think the likely response from p5p will to that you cannot change the behaviour of n for backwards compatibility reasons. The fact that you can no longer step through the innards of a map or grep is too much of loss. That said, I think the concept has great merit. To that end, an approach that is more likely to succeed would be to introduce a new command letter. N is currently free (according to my copy of bleadperl).

As a minor stylistic issue, the Perl core hasn't drunk the PBP kool-aid, and thus you would probably want to write your check as the more compact

if ($dbline[$line] =~ /\b(?:grep|map|sort)\b/) {...

You also don't need to capture it. I also wonder if that will pick up a "map" in a quoted string or a comment...

In a similar vein, I think my @sublast = split m{-}xms, $sub{$sub} looks slightly silly.

split /-/ is fine.

update: I am a bit thick sometimes. It took tye's reply for me to realise that there is no loss of functionality. So the N hack isn't necessary. So what's left is purely a matter of code style.

• another intruder with the mooring in the heart of the Perl


In reply to Re: RFC: Accelerated stepping by grinder
in thread RFC: Accelerated stepping by hexcoder

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.