X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind%2FReport.pm;h=9ecaff32ccd7a51ab01b35f89699b7672df5c908;hb=b34179155630f5f4cbea1749af4054a746ded9a4;hp=1192f7200a79da3c97b3ac08c10d8b0da08c252c;hpb=cea977523ce9c4be865b97a0813a5e14cce873f9;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind/Report.pm b/lib/Test/Valgrind/Report.pm index 1192f72..9ecaff3 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.13 +Version 1.17 =cut -our $VERSION = '1.13'; +our $VERSION = '1.17'; =head1 DESCRIPTION @@ -27,7 +27,13 @@ The C kind is reserved for diagnostics. 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,2011 Vincent Pit, all rights reserved. +Copyright 2009,2010,2011,2013,2015 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.