in reply to RFC: Accelerated stepping
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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: RFC: Accelerated stepping
by hexcoder (Curate) on Sep 02, 2008 at 14:40 UTC | |
by grinder (Bishop) on Sep 02, 2008 at 20:24 UTC | |
by tye (Sage) on Sep 03, 2008 at 03:45 UTC | |
by hexcoder (Curate) on Sep 04, 2008 at 06:43 UTC | |
by tye (Sage) on Sep 04, 2008 at 07:24 UTC |