Constants/XML.pm

filter: Statementstmt 100% 23 / 23 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 86.1% 31 / 36 CC 3 SCAR 6.0
CC
3
Cov
89%
_init
3.2
BEGIN
1.0
BEGIN
1.0
CRAP 1.8
« Constants/Perl.pm ↑ Summary
1  
2 package Config::Constants::XML;
3  
4 10 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 10 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 10 our $VERSION = '0.02';
8  
9 10 ▶use base 'Config::Constants::Perl';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 10 ▶use Config::Constants::XML::SAX::Handler;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 10 ▶use XML::SAX::ParserFactory;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 8 ▶sub _init {
Subroutine _init: called CC=3 SCAR=11.6
15 8 my ($self, $file) = @_;
16 8 ▶ (-e $file && -f $file)
Branch: 1 branch
BranchTrueFalseTotal
-e $file and -f $file or die "Bad config file '${file}' either it doesn't exist or it's not a file" 8 0 8
Condition33%1/3
-e $file and -f $file
!ll&&!rl&&r
008
MC/DC0%0/2
-e $file and -f $file
-e $file -f $file
Truth table33%1/3
A and B
A= -e $fileB= -f $file
ABresult
0X0
100
111
17 || die "Bad config file '$file' either it doesn't exist or it's not a file";
18 8 my $handler = Config::Constants::XML::SAX::Handler->new();
19 8 my $p = XML::SAX::ParserFactory->parser(Handler => $handler);
20 8 $p->parse_uri($file);
21 7 $self->{_config} = $handler->config();
22 }
23  
24 10 1;
25  
26 __END__
« Constants/Perl.pm ↑ Summary