Skip the Perl debugger test if the harness itself is already running
authorNicholas Clark <nick@ccl4.org>
Sun, 17 Aug 2008 16:53:04 +0000 (16:53 +0000)
committerNicholas Clark <nick@ccl4.org>
Sun, 17 Aug 2008 16:53:04 +0000 (16:53 +0000)
under some kind of debugger (such as a profiler) to avoid confusing
things. (such as trashing the profiler output file from the harness.)

p4raw-id: //depot/perl@34204

lib/perl5db.t

index 12a090a..2cf7958 100644 (file)
@@ -20,6 +20,10 @@ my $dev_tty = '/dev/tty';
        print "1..0 # Skip: no $dev_tty\n";
        exit 0;
     }
+    if ($ENV{PERL5DB}) {
+       print "1..0 # Skip: \$ENV{PERL5DB} is already set to '$ENV{PERL5DB}'\n";
+       exit 0;
+    }
 }
 
 plan(1);