On Thursday 04 September 2008 21:33:41 Heiko Ei�feldt wrote:
> Hello Richard,
> I discussed this topic and patch on PerlMonks, and got a general
> agreement, that the patch would have great merit.
Hi Heiko,

Good to hear that - I found the thread and appended my half'pen'th.

> New Plan
> ========
> So I would like to make a patch now, that will have 'n' short cut for 
> ANY code block, not only subroutines. And that should be done without a
> regexp.
Hmmm, yes but there's always exceptions...  consider arriving at the following 
pseudocode under the debugger:

<DB 1> 

Do you want to step over all the three code lines above with 'n'?  Probably 
not if it's just a way of controlling lexical variables, for example, you 
would be expecting to step to the next statement (code1) rather than leap 
over to code4.  I'm not sure what the solution is, but as you can see from the 
various comments, it's never quite as simple as it might seem at first.  
Possibly because it's Perl, there's just SMWTDI (so many ways to do it), that 
these kind of edge cases can become quite problematic.

> the special treatment of 'n' regarding subroutines only needs to be extended 
> to general code blocks like those in grep/map/sort, ...
It's perl which provides the hook for the debugger, calling DB::sub on each 
subroutine, just as DB::DB gets called for each line, so I'm not sure how 
easy it's going to be to extend that handling for map{} and grep{} and sort{} 
blocks, unless you modify Perl's source too.  You may still have to emulate 
it in the way you started to...

> Help is of course very much appreciated!!
If I can help, I'll be happy to do so.

Richard Foley
Ciao - shorter than aufwiedersehen


Reply via email to