]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/blobdiff - lib/Test/Valgrind/Tool.pm
Make sure the POD headings are linkable
[perl/modules/Test-Valgrind.git] / lib / Test / Valgrind / Tool.pm
index 304cf721216c59fed9ce5c97eee5c56c2842a0e0..4aea0fba6f235584d96fbef1da37c3cdf0181b5c 100644 (file)
@@ -30,6 +30,8 @@ use base qw<Test::Valgrind::Component Test::Valgrind::Carp>;
 
 =head2 C<requires_version>
 
+    my $required_version = $tvt->requires_version;
+
 The minimum C<valgrind> 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<new>
+
+    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.
@@ -63,6 +67,8 @@ sub new {
 
 =head2 C<new_trainer>
 
+    my $tvt_train = Test::Valgrind::Tool->new_trainer;
+
 Creates a new tool object suitable for generating suppressions.
 
 Defaults to return C<undef>, which skips suppression generation.
@@ -71,7 +77,9 @@ Defaults to return C<undef>, which skips suppression generation.
 
 sub new_trainer { }
 
-=head2 C<parser_class $session>
+=head2 C<parser_class>
+
+    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<report_class $session>
+=head2 C<report_class>
+
+    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<args $session>
+=head2 C<args>
+
+    my @args = $tvt->args($session);
 
 Returns the list of tool-specific arguments that are to be passed to C<valgrind>.
 All the suppression arguments are already handled by the session.
@@ -102,7 +114,9 @@ Defaults to the empty list.
 
 sub args { }
 
-=head2 C<suppressions_tag $session>
+=head2 C<suppressions_tag>
+
+    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<undef> to indicate that no special suppressions are needed.
 
@@ -112,13 +126,17 @@ This method must be implemented when subclassing.
 
 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>.
 
-=head2 C<filter $session, $report>
+=head2 C<filter>
+
+    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.
@@ -129,7 +147,9 @@ Defaults to the identity function.
 
 sub filter { $_[2] }
 
-=head2 C<finish $session>
+=head2 C<finish>
+
+    $tvt->finish($session);
 
 Called when the C<$session> finishes.