X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind%2FAction.pm;h=44b6a05a467527dd4a9e6825a8252e30b81633d1;hb=08860dad1f820cce06758ec4add9353a4dbc8175;hp=d680855ae9bbd8aa3ec98fe8922bc0bf8692343e;hpb=abe419ac02d109283a1fe5615f5ab9d0a9a5572f;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind/Action.pm b/lib/Test/Valgrind/Action.pm index d680855..44b6a05 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.01 +Version 1.10 =cut -our $VERSION = '1.01'; +our $VERSION = '1.10'; =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