]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/blobdiff - lib/Test/Valgrind.pm
No need to check the valgrind executable two times
[perl/modules/Test-Valgrind.git] / lib / Test / Valgrind.pm
index dd367da5b55646e4820bafdebb0e35a08714a5b3..838a3ae777223ad0952cf5862de84a7d8d37b399 100644 (file)
@@ -55,7 +55,7 @@ If true, do not use any suppressions.
 
 =item C<< callers => $number >>
 
-Specify the maximum stack depth studied when valgrind encounters an error. Raising this number improves granularity. Default is 50.
+Specify the maximum stack depth studied when valgrind encounters an error. Raising this number improves granularity. Default is 12.
 
 =item C<< extra => [ @args ] >>
 
@@ -88,7 +88,8 @@ sub import {
    $file = $next;
   }
   return if not $file or $file eq '-e';
-  my $callers = $args{callers} || 50;
+  my $callers = $args{callers};
+  $callers = 12 unless defined $callers;
   $callers = int $callers;
   my $vg = Test::Valgrind::Suppressions::VG_PATH;
   if (!$vg || !-x $vg) {
@@ -133,7 +134,7 @@ sub import {
    print STDERR "valgrind @args\n" if $args{diag};
    local $ENV{PERL_DESTRUCT_LEVEL} = 3;
    local $ENV{PERL_DL_NONLAZY} = 1;
-   exec $vg, @args if $vg and -x $vg;
+   exec $vg, @args;
   }
   close $wtr or croak "close(\$wtr): $!";
   local $SIG{INT} = sub { kill -(SIGTERM) => $pid };