X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind%2FCommand%2FPerl.pm;h=55c8babe5bb48e99eace1bf5148dd600cd756900;hb=8cacc78f5dbd91f8ff36075b44d923edd659541f;hp=494c1442a77da7c46a630b9de2792c22e395b1e3;hpb=77d53e292f2fdac4991d1d6c140f1edd79ff3afa;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind/Command/Perl.pm b/lib/Test/Valgrind/Command/Perl.pm index 494c144..55c8bab 100644 --- a/lib/Test/Valgrind/Command/Perl.pm +++ b/lib/Test/Valgrind/Command/Perl.pm @@ -9,11 +9,11 @@ Test::Valgrind::Command::Perl - A Test::Valgrind command that invokes perl. =head1 VERSION -Version 1.13 +Version 1.15 =cut -our $VERSION = '1.13'; +our $VERSION = '1.15'; =head1 DESCRIPTION @@ -186,6 +186,23 @@ sub suppressions_tag { return $self->{suppressions_tag}; } +sub check_suppressions_file { + my ($self, $file) = @_; + + { + open my $fh, '<', $file or return 0; + + local $_; + while (<$fh>) { + return 1 if /^\s*fun:Perl_/; + } + + close $fh; + } + + return 0; +} + sub filter { my ($self, $session, $report) = @_; @@ -239,7 +256,7 @@ You can find documentation for this module with the perldoc command. =head1 COPYRIGHT & LICENSE -Copyright 2009,2010,2011,2013 Vincent Pit, all rights reserved. +Copyright 2009,2010,2011,2013,2015 Vincent Pit, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. @@ -260,11 +277,11 @@ eval { XSLoader::load('Test::Valgrind', $Test::Valgrind::VERSION); }; -unless ($@) { - Test::Valgrind::notleak("valgrind it!"); -} else { +if ($@) { diag $@; *Test::Valgrind::DEBUGGING = sub { 'unknown' }; +} else { + Test::Valgrind::notleak("valgrind it!"); } plan tests => 1;