Skip to content

Commit

Permalink
MPI: make VERBOSE work with perl 5.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaas80 committed Mar 11, 2020
1 parent f0389e5 commit d596dd3
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/detect.pl
Expand Up @@ -15,13 +15,14 @@

if ($verbose) {
# we implement VERBOSE by restarting in the debugger and having it print each line
if (not defined($ENV{'PERL5DB'})) {
$ENV{'PERL5DB'} = 'sub DB::DB {
no strict;
my ($p, $f, $l) = caller;
my $code = \@{"::_<$f"};
print STDERR ">> $f:$l: $code->[$l]";
}';
# this subroutine is defined all the time, just only used when in debug mode
sub DB::DB {
no strict;
my ($p, $f, $l) = caller;
my $code = \@{"::_<$f"};
print STDERR ">> $f:$l: $code->[$l]";
}
if (not $^P) {
exit system($^X, "-d", $0, @ARGV);
}
}
Expand Down

0 comments on commit d596dd3

Please sign in to comment.