Config.pm

filter: Statementstmt 40.9% 9 / 22 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 33.3% 2 / 6 Podpod 100% 4 / 4 totaltotal 44.1% 15 / 34 CC 3 SCAR 17.0
CC
3
Cov
38%
get
12.0
new
2.0
config
2.0
CRAP 5.5
« Config/General.pm ↑ Summary Plugin/Check/Hostname.pm »
1 # $Id: Config.pm,v 1.3 2003/04/08 00:27:30 cwest Exp $
2 package POEST::Config;
3  
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 $^W = 1;
6  
7 1 ▶use vars qw[$VERSION];
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 $VERSION = (qw$Revision: 1.3 $)[1];
9  
10 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
11 0 my ($class, %args) = @_;
12
13 0 return bless \%args, $class;
14 }
15  
16 0 ▶sub config {
Subroutine config: not called CC=1 SCAR=6.9
Pod documented
17 0 my ($self) = @_;
18  
19 0 return $self;
20 }
21  
22 0 ▶sub get {
Subroutine get: not called CC=3 SCAR=24.8
Pod documented
23 0 my ($self, @configs) = @_;
24  
25 0 my %conf = ();
26 0 foreach ( @configs ) {
27 0 ▶ $conf{$_} = $self->{$_} if exists $self->{$_};
Branch: 1 branch
BranchTrueFalseTotal
if exists $self->{$_} 0 0 0
28 }
29  
30 0 return \%conf;
31 }
32  
33 0 ▶sub set {
Subroutine set: not called CC=1 SCAR=6.9
Pod documented
34 0 my ($self, %set) = @_;
35
36 0 my @keys = keys %set;
37
38 0 @{$self}{@keys} = @set{@keys};
39 }
40  
41 1 1;
42  
43 __END__
« Config/General.pm ↑ Summary Plugin/Check/Hostname.pm »