X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind%2FComponent.pm;h=739845ff04f8e8512fe830bb22713bb7a01969d8;hb=d83358595540f8645467c2d1a2f658fa74b14c72;hp=15c7cb9b5742994e4fc1e76e13fc18c7e98ff40a;hpb=a7f76c8c630e9273e6b8c72f884e7fe012da116e;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind/Component.pm b/lib/Test/Valgrind/Component.pm index 15c7cb9..739845f 100644 --- a/lib/Test/Valgrind/Component.pm +++ b/lib/Test/Valgrind/Component.pm @@ -9,11 +9,11 @@ Test::Valgrind::Component - Base class for Test::Valgrind components. =head1 VERSION -Version 1.12 +Version 1.13 =cut -our $VERSION = '1.12'; +our $VERSION = '1.13'; =head1 DESCRIPTION @@ -23,12 +23,14 @@ This class is the base for all others that act as components that can be started use Scalar::Util (); -use base qw/Test::Valgrind::Carp/; +use base qw; =head1 METHODS =head2 C + my $tvc = Test::Valgrind::Component->new; + Basic constructor. =cut @@ -50,7 +52,9 @@ sub new { }, $class; } -=head2 C +=head2 C + + $tvc->started($bool); Specifies whether the component is running (C<1>), stopped (C<0>) or was never started (C). @@ -60,6 +64,8 @@ sub started { @_ <= 1 ? $_[0]->{started} : ($_[0]->{started} = $_[1] ? 1 : 0) } =head2 C + $tvc->start; + Marks the component as started, and throws an exception if it was already. Returns its self object. @@ -76,6 +82,8 @@ sub start { =head2 C + $tvc->finish; + Marks the component as stopped, and throws an exception if it wasn't started. Returns its self object. @@ -113,7 +121,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 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.