X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind%2FComponent.pm;h=f899025711b547090ab2c7f280be2e99b0e95dfd;hb=f2071d95aaaa4817e91cc33530deedc8d701d44d;hp=3b7a5701f3a698167d95a0c0281fabd0d16eb35c;hpb=943acd9991dfbe73afc5eca6921767f098f5e6a9;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind/Component.pm b/lib/Test/Valgrind/Component.pm index 3b7a570..f899025 100644 --- a/lib/Test/Valgrind/Component.pm +++ b/lib/Test/Valgrind/Component.pm @@ -9,20 +9,28 @@ Test::Valgrind::Component - Base class for Test::Valgrind components. =head1 VERSION -Version 1.02 +Version 1.19 =cut -our $VERSION = '1.02'; +our $VERSION = '1.19'; + +=head1 DESCRIPTION + +This class is the base for all others that act as components that can be started and stopped. + +=cut 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 @@ -44,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). @@ -54,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. @@ -70,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. @@ -107,7 +121,7 @@ You can find documentation for this module with the perldoc command. =head1 COPYRIGHT & LICENSE -Copyright 2009 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.