X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fperl5db.pl;h=836e5594d8d9bc5fe34e76b277635d628a703bbc;hb=11d7f64f86584fefbeb7beb3792b3ccd34a45058;hp=c2ebca11928f9837e81683e400e491d14a62ac83;hpb=3170649431eb5688b22560d1c824cf4b7252a79c;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/perl5db.pl b/lib/perl5db.pl index c2ebca1..836e559 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -401,6 +401,12 @@ if ($notty) { $console = "/dev/tty"; } elsif ($^O eq 'dos' or -e "con" or $^O eq 'MSWin32') { $console = "con"; + } elsif ($^O eq 'MacOS') { + if ($MacPerl::Version !~ /MPW/) { + $console = "Dev:Console:Perl Debug"; # Separate window for application + } else { + $console = "Dev:Console"; + } } else { $console = "sys\$command"; } @@ -426,7 +432,7 @@ if ($notty) { PeerAddr => $remoteport, Proto => 'tcp', ); - if (!$OUT) { die "Could not create socket to connect to remote host."; } + if (!$OUT) { die "Unable to connect to remote host: $remoteport\n"; } $IN = $OUT; } else { @@ -617,7 +623,7 @@ EOP next CMD; } } - $cmd =~ /^q$/ && ($exiting = 1) && exit 0; + $cmd =~ /^q$/ && ($fall_off_end = 1) && exit $?; $cmd =~ /^h$/ && do { print_help($help); next CMD; }; @@ -1430,7 +1436,7 @@ EOP $piped= ""; } } # CMD: - $exiting = 1 unless defined $cmd; + $fall_off_end = 1 unless defined $cmd; # Emulate `q' on EOF foreach $evalarg (@$post) { &eval; } @@ -2684,10 +2690,11 @@ sub end_report { } END { - $finished = $inhibit_exit; # So that some keys may be disabled. + $finished = 1 if $inhibit_exit; # So that some keys may be disabled. + $fall_off_end = 1 unless $inhibit_exit; # Do not stop in at_exit() and destructors on exit: - $DB::single = !$exiting && !$runnonstop; - DB::fake::at_exit() unless $exiting or $runnonstop; + $DB::single = !$fall_off_end && !$runnonstop; + DB::fake::at_exit() unless $fall_off_end or $runnonstop; } package DB::fake;