free TLS slot properly on Windows
[p5sagit/p5-mst-13.2.git] / lib / perl5db.pl
index b8ac490..586cfd8 100644 (file)
@@ -617,7 +617,7 @@ EOP
                            next CMD;
                        } 
                    }
-                   $cmd =~ /^q$/ && ($exiting = 1) && exit 0;
+                   $cmd =~ /^q$/ && ($exiting = 1) && exit $?;
                    $cmd =~ /^h$/ && do {
                        print_help($help);
                        next CMD; };
@@ -931,7 +931,7 @@ EOP
                        next CMD; };
                    $cmd =~ /^b\b\s*(\d*)\s*(.*)/ && do {
                        $i = $1 || $line;
-                       $cond = defined $2 ? $2 : '1';
+                       $cond = length $2 ? $2 : '1';
                        if ($dbline[$i] == 0) {
                            print $OUT "Line $i not breakable.\n";
                        } else {
@@ -1511,6 +1511,7 @@ sub eval {
        local $otrace = $trace;
        local $osingle = $single;
        local $od = $^D;
+       { ($evalarg) = $evalarg =~ /(.*)/s; }
        @res = eval "$usercontext $evalarg;\n"; # '\n' for nice recursive debug
        $trace = $otrace;
        $single = $osingle;