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

Re: perldebug.pod suggestion

Thread Previous | Thread Next
Joe McMahon
January 23, 2003 15:48
Re: perldebug.pod suggestion
Message ID:

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
> --- 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<> 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 

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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About