File Coverage

blib/lib/Perlbal/CommandContext.pm
Criterion Covered Total %
statement 18 18 100.0
branch 2 2 100.0
condition n/a
subroutine 6 6 100.0
pod 0 2 0.0
total 26 28 92.8


line stmt bran cond sub pod time code
1             # keep track of the surrounding context for a ManageCommand, so commands
2             # can be less verbose when in config files
3             #
4             # Copyright 2005-2007, Six Apart, Ltd.
5             #
6              
7             package Perlbal::CommandContext;
8 23     23   1478 use strict;
  23         49  
  23         797  
9 23     23   128 use warnings;
  23         61  
  23         779  
10 23     23   140 no warnings qw(deprecated);
  23         57  
  23         905  
11              
12             use fields (
13 23         159 'last_created', # the name of the last pool or service created
14             'verbose', # scalar bool: verbosity ("OK" on success)
15 23     23   119 );
  23         49  
16              
17             sub new {
18 898     898 0 2524 my $class = shift;
19 898         3403 my $self = fields::new($class);
20 897         59842 return $self;
21             }
22              
23             sub verbose {
24 381     381 0 569 my $self = shift;
25 381 100       1386 $self->{verbose} = shift if @_;
26 381         2027 $self->{verbose};
27             }
28              
29             1;
30              
31             # Local Variables:
32             # mode: perl
33             # c-basic-indent: 4
34             # indent-tabs-mode: nil
35             # End: