X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind%2FTool%2Fmemcheck.pm;h=7b972461f51e611583b1fd318811dd3acbf522bf;hb=3a312e2c6e7fdc7be70dcc8ccca604e7c62699f5;hp=1b1ad4bc190e12201ed60b8b8bbd3551905be7f8;hpb=d83358595540f8645467c2d1a2f658fa74b14c72;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind/Tool/memcheck.pm b/lib/Test/Valgrind/Tool/memcheck.pm index 1b1ad4b..7b97246 100644 --- a/lib/Test/Valgrind/Tool/memcheck.pm +++ b/lib/Test/Valgrind/Tool/memcheck.pm @@ -9,11 +9,11 @@ Test::Valgrind::Tool::memcheck - Run an analysis through the memcheck tool. =head1 VERSION -Version 1.13 +Version 1.16 =cut -our $VERSION = '1.13'; +our $VERSION = '1.16'; =head1 DESCRIPTION @@ -58,7 +58,7 @@ sub new { my %args = @_; - my $callers = delete $args{callers} || 12; + my $callers = delete $args{callers} || 50; $callers =~ s/\D//g; my $self = bless $class->Test::Valgrind::Tool::new(%args), $class; @@ -97,8 +97,10 @@ sub parser_class { ? 'Test::Valgrind::Parser::Suppressions::Text' : 'Test::Valgrind::Parser::XML::Twig'; - local $@; - eval "require $class"; + { + local $@; + eval "require $class; 1" or die $@; + } return $class; } @@ -114,8 +116,12 @@ This tool emits C object reports in anal sub report_class { my ($self, $session) = @_; - $session->do_suppressions ? 'Test::Valgrind::Report::Suppressions' - : 'Test::Valgrind::Tool::memcheck::Report' + if ($session->do_suppressions) { + require Test::Valgrind::Parser::Suppressions::Text; + return 'Test::Valgrind::Report::Suppressions'; + } else { + return 'Test::Valgrind::Tool::memcheck::Report'; + } } sub args { @@ -162,7 +168,7 @@ You can find documentation for this module with the perldoc command. =head1 COPYRIGHT & LICENSE -Copyright 2009,2010,2011 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. @@ -174,7 +180,7 @@ package Test::Valgrind::Tool::memcheck::Report; use base qw; -our $VERSION = '1.13'; +our $VERSION = '1.16'; my @kinds = qw< InvalidFree