Sync with libnet-1.11
[p5sagit/p5-mst-13.2.git] / lib / perl5db.pl
index fd925b5..6e9a9d5 100644 (file)
@@ -1,7 +1,7 @@
 package DB;
 
 # Debugger for Perl 5.00x; perl5db.pl patch level:
-$VERSION = 1.17;
+$VERSION = 1.19;
 $header  = "perl5db.pl version $VERSION";
 
 # It is crucial that there is no lexicals in scope of `eval ""' down below
@@ -316,6 +316,10 @@ sub eval {
 #   + m(methods),   M(modules)        # ...           (was m,v)
 #   + o(option)                       # lc            (was O)
 #   + v(view code), V(view Variables) # ...           (was w,V)
+# Changes: 1.18: Mar 17, 2002 Richard Foley <richard.foley@rfi.net>
+#   + fixed missing cmd_O bug
+# Changes: 1.19: Mar 29, 2002 Spider Boardman
+#   + Added missing local()s -- DB::DB is called recursively.
 # 
 ####################################################################
 
@@ -662,9 +666,9 @@ sub DB {
     }
     $runnonstop = 0 if $single or $signal; # Disable it if interactive.
     &save;
-    ($package, $filename, $line) = caller;
-    $filename_ini = $filename;
-    $usercontext = '($@, $!, $^E, $,, $/, $\, $^W) = @saved;' .
+    local($package, $filename, $line) = caller;
+    local $filename_ini = $filename;
+    local $usercontext = '($@, $!, $^E, $,, $/, $\, $^W) = @saved;' .
       "package $package;";     # this won't let them modify, alas
     local(*dbline) = $main::{'_<' . $filename};
 
@@ -675,7 +679,7 @@ sub DB {
        *dbline = $main::{'_<' . $filename};
     }
 
-    $max = $#dbline;
+    local $max = $#dbline;
     if ($dbline{$line} && (($stop,$action) = split(/\0/,$dbline{$line}))) {
                if ($stop eq '1') {
                        $signal |= 1;
@@ -1441,7 +1445,7 @@ sub cmd_wrapper {
        my $call = 'cmd_'.(
                $set{$CommandSet}{$cmd} || $cmd
        );
-       # print "rjsf: cmd_wrapper($cmd): $CommandSet($set{$CommandSet}{$cmd}) => call($call)\n";
+       # print "cmd_wrapper($cmd): $CommandSet($set{$CommandSet}{$cmd}) => call($call)\n";
 
        return &$call($line, $dblineno);
 }
@@ -1885,6 +1889,12 @@ sub cmd_o {
        }
 }
 
+sub cmd_O {
+       print $OUT "The old O command is now the o command.\n";        # hint
+       print $OUT "Use 'h' to get current command help synopsis or\n"; # 
+       print $OUT "use 'o CommandSet=pre580' to revert to old usage\n"; # 
+}
+
 sub cmd_v {
        my $line = shift;