mpersico has asked for the wisdom of the Perl Monks concerning the following question:
I have worked out a system that allows me to maintain breakpoints in the Perl debugger from session to session and load them up next time I run the debugger:
First, I create a ~/.perldb file that contains:
## -*- cperl -*- sub afterinit { use Cwd; my $dbg = getcwd(). "/.perldb"; print "$dbg...\n"; if ( -e $dbg ) { no strict; do $dbg; } }
Then I create a local .perldb file in the current working directory where I run perl -d:
## -*- cperl -*- push @DB::typeahead, 'f Some.pm', 'b 75', 'f bin/mymainscript', 'b 180', 'b 192', 'L';
So, my questions are:
1) Is this technique widely enough known that I would look like an idiot for blogging about it?
2) Is the usage of @DB::typeahead unsafe in that it's a direct tap into the DB module that may be changed and, therefore, should not be promoted?
Thank you.
Back to
Seekers of Perl Wisdom