X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind%2FReport.pm;h=8618d59f6844c9e4cfd566dc6f2a5517cf191b2a;hb=77d53e292f2fdac4991d1d6c140f1edd79ff3afa;hp=44d1c77c9119b0a3a56ff35bc64f5bb519b383df;hpb=a7f76c8c630e9273e6b8c72f884e7fe012da116e;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind/Report.pm b/lib/Test/Valgrind/Report.pm index 44d1c77..8618d59 100644 --- a/lib/Test/Valgrind/Report.pm +++ b/lib/Test/Valgrind/Report.pm @@ -9,11 +9,11 @@ Test::Valgrind::Report - Base class for Test::Valgrind error reports. =head1 VERSION -Version 1.12 +Version 1.13 =cut -our $VERSION = '1.12'; +our $VERSION = '1.13'; =head1 DESCRIPTION @@ -25,9 +25,15 @@ The C kind is reserved for diagnostics. =cut -use base qw/Test::Valgrind::Carp/; +use base qw; -=head2 C<< new kind => $kind, id => $id, data => $data >> +=head2 C + + 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 + + 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 + my $kind = $tvr->kind; + Read-only accessor for the C option. =cut @@ -93,6 +103,8 @@ sub kind { $_[0]->{kind} } =head2 C + my $id = $tvr->id; + Read-only accessor for the C option. =cut @@ -101,6 +113,8 @@ sub id { $_[0]->{id} } =head2 C + my $data = $tvr->data; + Read-only accessor for the C option. =cut @@ -109,6 +123,8 @@ sub data { $_[0]->{data} } =head2 C + $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 + 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 +=head2 C + + $tvr->valid_kind($kind); Tells whether C<$kind> is a valid kind for this report class. @@ -158,7 +178,7 @@ You can find documentation for this module with the perldoc command. =head1 COPYRIGHT & LICENSE -Copyright 2009,2010 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.