Perlbal/CommandContext.pm

filter: Statementstmt 100% 19 / 19 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 2 totaltotal 93.1% 27 / 29 CC 2 SCAR 2.5
CC
2
Cov
100%
verbose
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Perlbal/Util.pm ↑ Summary
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 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 23 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 23 ▶no warnings qw(deprecated);
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 23 ▶use fields (
Subroutine BEGIN: called CC=1 SCAR=0.0
13 23 'last_created', # the name of the last pool or service created
14 'verbose', # scalar bool: verbosity ("OK" on success)
15 23 );
16  
17 912 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
18 912 my $class = shift;
19 912 my $self = fields::new($class);
20 911 return $self;
21 }
22  
23 393 ▶sub verbose {
Subroutine verbose: called CC=2 SCAR=6.9
Pod undocumented
24 393 my $self = shift;
25 393 ▶ $self->{verbose} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 21 372 393
26 393 $self->{verbose};
27 }
28  
29 23 1;
30  
31 # Local Variables:
32 # mode: perl
33 # c-basic-indent: 4
34 # indent-tabs-mode: nil
35 # End:
« Perlbal/Util.pm ↑ Summary