Csistck/Config.pm

filter: Statementstmt 100% 18 / 18 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 92.8% 26 / 28 SCAR 11.0
CC
3
Cov
95%
option
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« Csistck/Role.pm ↑ Summary Csistck/Test/File.pm »
1 package Csistck::Config;
2  
3 17 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 17 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 17 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 17 ▶use base 'Exporter';
Subroutine BEGIN: called CC=1 SCAR=0.0
8 17 our @EXPORT_OK = qw(option);
9  
10 # Configuration options
11 17 my $Config = { };
12  
13 sub option {
14 5 ▶ my ($key, $value) = @_;
Subroutine option: called CC=3 SCAR=11.0
Pod undocumented
15  
16 # No key?
17 5 ▶ return 0
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 5 5
18 unless (defined $key);
19
20 5 ▶ $Config->{$key} = $value
Branch: 1 branch
BranchTrueFalseTotal
if defined $value 1 4 5
21 if (defined $value);
22
23 5 return $Config->{$key};
24 }
25  
26 17 1;
« Csistck/Role.pm ↑ Summary Csistck/Test/File.pm »