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

perldebug.pod suggestion

Thread Next
From:
Jay Hannah
Date:
January 23, 2003 10:47
Subject:
perldebug.pod suggestion
Message ID:
005701c2c30f$e58e9e10$4709a8c0@omarests2

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



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