X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind%2FCommand.pm;h=b28a7bb13db1e6c2a9fb19a6dd14bcd9ba07447f;hb=cea977523ce9c4be865b97a0813a5e14cce873f9;hp=0b491baba248d1768350139f2616b377522d48e6;hpb=abe419ac02d109283a1fe5615f5ab9d0a9a5572f;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind/Command.pm b/lib/Test/Valgrind/Command.pm index 0b491ba..b28a7bb 100644 --- a/lib/Test/Valgrind/Command.pm +++ b/lib/Test/Valgrind/Command.pm @@ -9,11 +9,11 @@ Test::Valgrind::Command - Base class for Test::Valgrind commands. =head1 VERSION -Version 1.01 +Version 1.13 =cut -our $VERSION = '1.01'; +our $VERSION = '1.13'; =head1 DESCRIPTION @@ -23,7 +23,7 @@ Commands gather information about the target of the analysis. They should also p =cut -use base qw/Test::Valgrind::Carp/; +use base qw; =head1 METHODS @@ -50,7 +50,7 @@ sub new { } my $args = delete $args{args}; - $class->_croak('Invalid argument list') unless $args and ref $args eq 'ARRAY'; + $class->_croak('Invalid argument list') if $args and ref $args ne 'ARRAY'; bless { args => $args, @@ -98,6 +98,17 @@ This method must be implemented when subclassing. sub suppressions_tag; +=head2 C + +The C<$session> calls this method after receiving a report from the tool and before forwarding it to the action. +You can either return a mangled C<$report> (which does not need to be a clone of the original) or C if you want the action to ignore it completely. + +Defaults to the identity function. + +=cut + +sub filter { $_[2] } + =head1 SEE ALSO L, L. @@ -121,7 +132,7 @@ You can find documentation for this module with the perldoc command. =head1 COPYRIGHT & LICENSE -Copyright 2009 Vincent Pit, all rights reserved. +Copyright 2009,2010,2011 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.