+ my $tvt = Test::Valgrind::Tool->new(tool => $tool);
Creates a new tool object of type C<$tool> by requiring and redispatching the method call to the module named C<$tool> if it contains C<'::'> or to C<Test::Valgrind::Tool::$tool> otherwise.
The class represented by C<$tool> must inherit this class.
Creates a new tool object of type C<$tool> by requiring and redispatching the method call to the module named C<$tool> if it contains C<'::'> or to C<Test::Valgrind::Tool::$tool> otherwise.
The class represented by C<$tool> must inherit this class.
Returns a identifier that will be used to pick up the right suppressions for running the tool, or C<undef> to indicate that no special suppressions are needed.
Returns a identifier that will be used to pick up the right suppressions for running the tool, or C<undef> to indicate that no special suppressions are needed.
@@ -112,15+126,19 @@ This method must be implemented when subclassing.
sub suppressions_tag;
sub suppressions_tag;
-=head2 C<start $session>
+=head2 C<start>
+
+ $tvt->start($session);
Called when the C<$session> starts.
Defaults to set L<Test::Valgrind::Component/started>.
Called when the C<$session> starts.
Defaults to set L<Test::Valgrind::Component/started>.
-=head2 C<filter $session, $report>
+=head2 C<filter>
-The <$session> calls this method after receiving a report from the parser and before letting the command filter it.
+ my $filtered_report = $tvt->filter($session, $report);
+
+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<undef> if you want the action to ignore it completely.
Defaults to the identity function.
You can either return a mangled C<$report> (which does not need to be a clone of the original) or C<undef> if you want the action to ignore it completely.
Defaults to the identity function.
@@ -129,7+147,9 @@ Defaults to the identity function.
sub filter { $_[2] }
sub filter { $_[2] }
-=head2 C<finish $session>
+=head2 C<finish>
+
+ $tvt->finish($session);
Called when the C<$session> finishes.
Called when the C<$session> finishes.
@@ -158,7+178,7 @@ You can find documentation for this module with the perldoc command.
=head1 COPYRIGHT & LICENSE
=head1 COPYRIGHT & LICENSE
-Copyright 2009 Vincent Pit, all rights reserved.
+Copyright 2009,2010,2011,2013 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.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.