X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FTest-Valgrind.git;a=blobdiff_plain;f=lib%2FTest%2FValgrind%2FTool.pm;h=4aea0fba6f235584d96fbef1da37c3cdf0181b5c;hp=304cf721216c59fed9ce5c97eee5c56c2842a0e0;hb=d83358595540f8645467c2d1a2f658fa74b14c72;hpb=254ae9b36d4bdcc79ab4a2dacd3d717b5cea1f9e diff --git a/lib/Test/Valgrind/Tool.pm b/lib/Test/Valgrind/Tool.pm index 304cf72..4aea0fb 100644 --- a/lib/Test/Valgrind/Tool.pm +++ b/lib/Test/Valgrind/Tool.pm @@ -30,6 +30,8 @@ use base qw; =head2 C + my $required_version = $tvt->requires_version; + The minimum C version needed to run this tool. Defaults to C<3.1.0>. @@ -37,7 +39,9 @@ Defaults to C<3.1.0>. sub requires_version { '3.1.0' } -=head2 C<< new tool => $tool >> +=head2 C + + 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 otherwise. The class represented by C<$tool> must inherit this class. @@ -63,6 +67,8 @@ sub new { =head2 C + my $tvt_train = Test::Valgrind::Tool->new_trainer; + Creates a new tool object suitable for generating suppressions. Defaults to return C, which skips suppression generation. @@ -71,7 +77,9 @@ Defaults to return C, which skips suppression generation. sub new_trainer { } -=head2 C +=head2 C + + my $parser_class = $tvt->parser_class($session); Returns the class from which the parser for this tool output will be instanciated. @@ -81,7 +89,9 @@ This method must be implemented when subclassing. sub parser_class; -=head2 C +=head2 C + + my $report_class = $tvt->report_class($session); Returns the class in which suppression reports generated by this tool will be blessed. @@ -91,7 +101,9 @@ This method must be implemented when subclassing. sub report_class; -=head2 C +=head2 C + + my @args = $tvt->args($session); Returns the list of tool-specific arguments that are to be passed to C. All the suppression arguments are already handled by the session. @@ -102,7 +114,9 @@ Defaults to the empty list. sub args { } -=head2 C +=head2 C + + my $tag = $tvt->suppressions_tag($session); Returns a identifier that will be used to pick up the right suppressions for running the tool, or C to indicate that no special suppressions are needed. @@ -112,13 +126,17 @@ This method must be implemented when subclassing. sub suppressions_tag; -=head2 C +=head2 C + + $tvt->start($session); Called when the C<$session> starts. Defaults to set L. -=head2 C +=head2 C + + 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 if you want the action to ignore it completely. @@ -129,7 +147,9 @@ Defaults to the identity function. sub filter { $_[2] } -=head2 C +=head2 C + + $tvt->finish($session); Called when the C<$session> finishes.