X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind%2FTool.pm;h=dc7ba2f0f2376cda4a042dc38c7a484c4de1a217;hb=195f0244c01e942307e13d693f196156b9263444;hp=077fc09257ce71dbc1be397fff912b61cd766cfe;hpb=270aacc7f116b97928f9d70ce7936dd9d0a78ce0;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind/Tool.pm b/lib/Test/Valgrind/Tool.pm index 077fc09..dc7ba2f 100644 --- a/lib/Test/Valgrind/Tool.pm +++ b/lib/Test/Valgrind/Tool.pm @@ -9,11 +9,11 @@ Test::Valgrind::Tool - Base class for Test::Valgrind tools. =head1 VERSION -Version 1.02 +Version 1.11 =cut -our $VERSION = '1.02'; +our $VERSION = '1.11'; =head1 DESCRIPTION @@ -118,44 +118,16 @@ Called when the C<$session> starts. Defaults to set L. -=head2 C +=head2 C -Wraps around either L or L depending on the running mode of the C<$session>. -Croaks if the tool isn't started. +The C<$session> calls this method after receiving a report from the parser and before letting the command filter it. +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. -=cut - -sub parse { - my ($self, $sess, $fh) = @_; - - $self->_croak('Tool isn\'t started') unless $self->started; - - if ($sess->do_suppressions) { - $self->parse_suppressions($sess, $fh); - } else { - $self->parse_analysis($sess, $fh); - } -} - -=head2 C - -Parse the suppression reports that the C process attached to the session C<$session> send through the filehandle C<$fh>. - -This method must be implemented when subclassing. - -=cut - -sub parse_suppressions; - -=head2 C - -Parse the error reports sent by the C process attached to the session C<$session> through the filehandle C<$fh>. - -This method must be implemented when subclassing. +Defaults to the identity function. =cut -sub parse_analysis; +sub filter { $_[2] } =head2 C