X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind%2FReport.pm;h=1df2690f9ae763d939896b1e2b0c9c49d8f4720a;hb=f2071d95aaaa4817e91cc33530deedc8d701d44d;hp=46f44b83f5049b255905af8e9ff1ef40d781aa36;hpb=44f0639e6ac34bdc0be52d47fe2c2df43ab1ca94;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind/Report.pm b/lib/Test/Valgrind/Report.pm index 46f44b8..1df2690 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.19 =cut -our $VERSION = '1.12'; +our $VERSION = '1.19'; =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 Vincent Pit, all rights reserved. +Copyright 2009,2010,2011,2013,2015,2016 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.