]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/blobdiff - lib/Test/Valgrind/Report.pm
Make sure the POD headings are linkable
[perl/modules/Test-Valgrind.git] / lib / Test / Valgrind / Report.pm
index 1192f7200a79da3c97b3ac08c10d8b0da08c252c..b233b0deedbecd863fdcd8933a489ae4def481d3 100644 (file)
@@ -27,7 +27,13 @@ The C<Diag> kind is reserved for diagnostics.
 
 use base qw<Test::Valgrind::Carp>;
 
-=head2 C<< new kind => $kind, id => $id, data => $data >>
+=head2 C<new>
+
+   my $tvr = Test::Valgrind::Report->new(
+    kind => $kind,
+    id   => $id,
+    data => $data,
+   );
 
 Your usual constructor.
 
@@ -73,7 +79,9 @@ sub new {
  }, $class;
 }
 
-=head2 C<< new_diag $data >>
+=head2 C<new_diag>
+
+    my $diag_report = Test::Valgrind::Report->new_diag($data);
 
 Constructs a report with kind C<'Diag'>, an auto-incremented identifier and the given C<$data>.
 
@@ -85,6 +93,8 @@ sub new_diag { shift->new(kind => 'Diag', id => ++$diag_id, data => $_[0]) }
 
 =head2 C<kind>
 
+    my $kind = $tvr->kind;
+
 Read-only accessor for the C<kind> option.
 
 =cut
@@ -93,6 +103,8 @@ sub kind { $_[0]->{kind} }
 
 =head2 C<id>
 
+    my $id = $tvr->id;
+
 Read-only accessor for the C<id> option.
 
 =cut
@@ -101,6 +113,8 @@ sub id { $_[0]->{id} }
 
 =head2 C<data>
 
+    my $data = $tvr->data;
+
 Read-only accessor for the C<data> option.
 
 =cut
@@ -109,6 +123,8 @@ sub data { $_[0]->{data} }
 
 =head2 C<is_diag>
 
+    $tvr->is_diag;
+
 Tells if a report has the C<'Diag'> kind, i.e. is a diagnostic.
 
 =cut
@@ -117,6 +133,8 @@ sub is_diag { $_[0]->kind eq 'Diag' }
 
 =head2 C<kinds>
 
+    my @kinds = $tvr->kinds;
+
 Returns the list of valid kinds for this report class.
 
 Defaults to C<'Diag'>.
@@ -125,7 +143,9 @@ Defaults to C<'Diag'>.
 
 sub kinds { 'Diag' }
 
-=head2 C<valid_kind $kind>
+=head2 C<valid_kind>
+
+    $tvr->valid_kind($kind);
 
 Tells whether C<$kind> is a valid kind for this report class.