X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind%2FAction.pm;h=ac207786c33a9c13f9b2284f2ff3752f7fe8677b;hb=90b6c795c9fab6343c3501923aacc8f43f7a82ea;hp=b25722a289f49c38e4f0b784780dab0eb1467e9b;hpb=b41c498738a3a4ccb8742883a42e6ea5addb1afd;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind/Action.pm b/lib/Test/Valgrind/Action.pm index b25722a..ac20778 100644 --- a/lib/Test/Valgrind/Action.pm +++ b/lib/Test/Valgrind/Action.pm @@ -9,11 +9,11 @@ Test::Valgrind::Action - Base class for Test::Valgrind actions. =head1 VERSION -Version 1.00 +Version 1.12 =cut -our $VERSION = '1.00'; +our $VERSION = '1.12'; =head1 DESCRIPTION @@ -23,7 +23,7 @@ Actions are called each time a tool encounter an error and decide what to do wit =cut -use base qw/Test::Valgrind::Carp/; +use base qw/Test::Valgrind::Component Test::Valgrind::Carp/; =head1 METHODS @@ -49,11 +49,7 @@ sub new { return $action->new(%args); } - my $self = bless { }, $class; - - $self->started(undef); - - $self; + $class->SUPER::new(@_); } =head2 C @@ -64,37 +60,18 @@ Indicates if the action wants C to run in suppression-generating mode sub do_suppressions { 0 } -=head2 C - -Specifies whether the action is running (C<1>), stopped (C<0>) or was never started (C). - -=cut - -sub started { @_ <= 1 ? $_[0]->{started} : ($_[0]->{started} = $_[1]) } - =head2 C Called when the C<$session> starts. -Defaults to set L. - -=cut - -sub start { - my ($self) = @_; - - $self->_croak('Action already started') if $self->started; - $self->started(1); - - return; -} +Defaults to set L. =head2 C Invoked each time the C process attached to the C<$session> spots an error. C<$report> is a L object describing the error. -Defaults to check L. +Defaults to check L. =cut @@ -120,18 +97,7 @@ sub abort { $_[0]->_croak($_[2]) } Called when the C<$session> finishes. -Defaults to clear L. - -=cut - -sub finish { - my ($self) = @_; - - return unless $self->started; - $self->started(0); - - return; -} +Defaults to clear L. =head2 C @@ -152,7 +118,7 @@ sub status { =head1 SEE ALSO -L, L. +L, L, L. =head1 AUTHOR