File Coverage

blib/lib/ResourcePool/Command.pm
Criterion Covered Total %
statement 12 23 52.1
branch n/a
condition 0 3 0.0
subroutine 7 10 70.0
pod 2 7 28.5
total 21 43 48.8


line stmt bran cond sub pod time code
1             #*********************************************************************
2             #*** ResourcePool::Command
3             #*** Copyright (c) 2002,2003 by Markus Winand
4             #*** $Id: Command.pm,v 1.13 2013-04-16 10:14:44 mws Exp $
5             #*********************************************************************
6             package ResourcePool::Command;
7              
8 2     2   1114 use vars qw($VERSION);
  2         5  
  2         747  
9              
10             $VERSION = "1.0107";
11              
12             sub new($) {
13 0     0 1 0 my $proto = shift;
14 0   0     0 my $class = ref($proto) || $proto;
15 0         0 my $self = {};
16 0         0 bless($self, $class);
17 0         0 $self->resetReports();
18 0         0 return $self;
19             }
20              
21             sub init($) {
22 19     19 0 48 my ($self) = @_;
23             }
24              
25             sub preExecute($$) {
26 19     19 0 45 my ($self, $res) = @_;
27             }
28              
29             sub postExecute($$) {
30 9     9 0 23 my ($self, $res) = @_;
31             }
32              
33             sub cleanup($) {
34 19     19 0 48 my ($self) = @_;
35             }
36              
37             #sub revertExecute($$) {
38             # my ($self, $res) = @_;
39             #}
40              
41             sub _resetReports($) {
42 23     23   31 my ($self) = @_;
43 23         59 $self->{reports} = ();
44             }
45              
46             sub _addReport($$) {
47 41     41   51 my ($self, $rep) = @_;
48 41         43 push(@{$self->{reports}}, $rep);
  41         167  
49             }
50              
51             sub getReports($) {
52 0     0 0   my ($self) = @_;
53 0           return @{$self->{reports}};
  0            
54             }
55              
56             sub info($) {
57 0     0 1   my ($self) = @_;
58 0           return ref($self) . ": info() has not been overloaded";
59             }
60              
61             1;