| 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
Condition33%1/3
-e $file and -f $file
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
| |||||||||||||||||||||||||||||
| 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__ | ||||||||||||||||||||||||||||