develooper Front page | perl.perl5.porters | Postings from January 2003

Re: perldebug.pod suggestion

Thread Previous | Thread Next
From:
Joe McMahon
Date:
January 23, 2003 15:48
Subject:
Re: perldebug.pod suggestion
Message ID:
1DC5C2FC-2F2D-11D7-90E4-000393BCA0FC@ibiblio.org

On Thursday, January 23, 2003, at 01:47  PM, Jay Hannah wrote:

>
> Greetings --
>
> After nearly 10 years of Perl hacking, I hereby submit my very first 
> core Perl patch suggestion ever. This little documentation snippet 
> would have saved me a lot of time yesterday and this morning. I 
> believe this would be:
>
> - The first mention of @DB::typeahead in documentation.
> - The first example of afterinit() use in documentation.
> - The first example of .perldb use in documentation.
>
> I hope I've done this correctly. If not please be gentle. -grin-
>
> Thanks,
>
> Jay Hannah
> http://jays.net
>
>
>
> --- perldebug.pod       Wed Jul 17 08:22:40 2002
> +++ perldebug-new.pod   Thu Jan 23 12:34:26 2003
> @@ -891,6 +891,14 @@
>  it must be owned by the superuser or the current user, and writable
>  by no one but its owner.
>
> +You can mock TTY input to debugger by adding arbitrary commands to
> +@DB::typeahead. For example, your F<.perldb> file might contain:
> +
> +    sub afterinit { push @DB::typeahead, "b 4", "b 6"; }
> +
> +Which would attempt to set breakpoints on lines 4 and 6 immediately
> +after debugger initilization.
> +
>  If you want to modify the debugger, copy F<perl5db.pl> from the
>  Perl library to another name and hack it to your heart's content.
>  You'll then want to set your C<PERL5DB> environment variable to say
>
I'm not sure whether we want to document it or not; it's not 
specifically exposed as a usable variable. It's kind of a side effect 
of how the debugger's currently structured that this works.

I don't want to say "don't document it" because it is useful, but I'm 
not sure we want this to be the way that you do this operation from now 
on. You might want to add a statement to the effect of "@DB::typeahead 
is not a supported interface and is subject to change in future 
releases". This lets us document it  but not get stuck with it 
permanently.

In any case, this certainly needs to go on the list of "features the 
debugger should oughta have when we make it better".

  --- Joe M.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About