home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!math.fu-berlin.de!news.th-darmstadt.de!iti.informatik.th-darmstadt.de!schrod
- From: schrod@iti.informatik.th-darmstadt.de (Joachim Schrod)
- Subject: Two bugs (and a patch for them) in perldb.pl
- Sender: news@news.th-darmstadt.de (The News System)
- Message-ID: <1992Dec17.183738.49175@news.th-darmstadt.de>
- Date: Thu, 17 Dec 1992 18:37:38 GMT
- Nntp-Posting-Host: hp5.iti.informatik.th-darmstadt.de
- Organization: TU Darmstadt
- Lines: 56
-
- There are two small (but annoying) bugs in the Perl debugger,
- perldb.pl: The command
-
- -- V does not take the current package name as the default
- (as the doc says it should)
-
- -- V (and, of course, X) does not output to DB'OUT, but on the
- selected output handle.
- If one debugs a routine which happens to write on a file it's
- rather interesting to think first `well, nothing happened' and
- finding the variables dump later in the output file... :) :)
- Actually, that's because perldb.pl uses the package dumpvar.pl,
- which itself prints to the default output.
-
- The following small patch suffices.
-
- *** /usr/local/lib/perl/perldb.pl Thu Sep 24 15:59:23 1992
- --- perldb.pl Thu Dec 17 19:28:09 1992
- ***************
- *** 199,206 ****
- next CMD; };
- $cmd =~ s/^X\b/V $package/;
- $cmd =~ /^V$/ && do {
- ! $cmd = 'V $package'; };
- $cmd =~ /^V\b\s*(\S+)\s*(.*)/ && do {
- $packname = $1;
- @vars = split(' ',$2);
- do 'dumpvar.pl' unless defined &main'dumpvar;
- --- 199,207 ----
- next CMD; };
- $cmd =~ s/^X\b/V $package/;
- $cmd =~ /^V$/ && do {
- ! $cmd = "V $package"; };
- $cmd =~ /^V\b\s*(\S+)\s*(.*)/ && do {
- + local ($savout) = select(OUT);
- $packname = $1;
- @vars = split(' ',$2);
- do 'dumpvar.pl' unless defined &main'dumpvar;
- ***************
- *** 210,215 ****
- --- 211,217 ----
- else {
- print DB'OUT "dumpvar.pl not available.\n";
- }
- + select ($savout);
- next CMD; };
- $cmd =~ /^f\b\s*(.*)/ && do {
- $file = $1;
-
- --
- Joachim
-
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- Joachim Schrod Email: schrod@iti.informatik.th-darmstadt.de
- Computer Science Department
- Technical University of Darmstadt, Germany
-