X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind.pm;h=43c045886e0203196a2f1e05d9b934aa83b03cc8;hb=f2071d95aaaa4817e91cc33530deedc8d701d44d;hp=9b233c73e9371553de86006a01ae275031133b19;hpb=01d49783af4ec2292a5fe23164bbef36119613e0;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind.pm b/lib/Test/Valgrind.pm index 9b233c7..43c0458 100644 --- a/lib/Test/Valgrind.pm +++ b/lib/Test/Valgrind.pm @@ -9,11 +9,11 @@ Test::Valgrind - Generate suppressions, analyse and test any command with valgri =head1 VERSION -Version 1.15 +Version 1.19 =cut -our $VERSION = '1.15'; +our $VERSION = '1.19'; =head1 SYNOPSIS @@ -96,7 +96,7 @@ C<< callers => $number >> Specify the maximum stack depth studied when valgrind encounters an error. Raising this number improves granularity. -Ignored if you supply your own custom C, otherwise defaults to C<50>. +Ignored if you supply your own custom C, otherwise defaults to C<24> (the maximum allowed by C). =item * @@ -209,12 +209,14 @@ sub analyse { my $tool = delete $args{tool}; unless ($tool->$instanceof('Test::Valgrind::Tool')) { + my $callers = delete $args{callers} || 24; + $callers = 24 if $callers <= 0; require Test::Valgrind::Tool; local $@; $tool = eval { Test::Valgrind::Tool->new( - tool => $tool || 'memcheck', - callers => delete $args{callers}, + tool => $tool || 'memcheck', + callers => $callers, ); }; unless ($tool) { @@ -436,7 +438,7 @@ What your tests output to C and C is eaten unless you pass the C =head1 DEPENDENCIES -L, L, L, L, L. +L, L, L, L. =head1 SEE ALSO @@ -479,7 +481,7 @@ All you people that showed interest in this module, which motivated me into comp =head1 COPYRIGHT & LICENSE -Copyright 2008,2009,2010,2011,2013,2015 Vincent Pit, all rights reserved. +Copyright 2008,2009,2010,2011,2013,2015,2016 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.