ASP4/ConfigParser.pm

filter: Statementstmt 84.2% 16 / 19 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 2 totaltotal 75.0% 21 / 28 CC 3 SCAR 9.2
CC
3
Cov
76%
parse
4.5
BEGIN
1.0
BEGIN
1.0
CRAP 2.5
« ASP4/FileUpload.pm ↑ Summary ASP4/ConfigNode.pm »
1  
2 package ASP4::ConfigParser;
3  
4 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 9 ▶use warnings 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 9 ▶use ASP4::Config;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8  
9 sub new
10 {
11 3 ▶ my ($class) = @_;
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
12
13 3 return bless { }, $class;
14 }# end new()
15  
16  
17 sub parse
18 {
19 3 ▶ my ($s, $doc, $root) = @_;
Subroutine parse: called CC=3 SCAR=15.1
Pod undocumented
20
21 3 my $config = ASP4::Config->new( $doc, $root );
22
23 # Now do any post-processing:
24 3 foreach my $class ( $config->system->post_processors )
25 {
26 0 (my $file = "$class.pm") =~ s/::/\//;
27 0 ▶ require $file unless $INC{$file};
Branch: 1 branch
BranchTrueFalseTotal
unless $INC{$file} 0 0 0
28 0 $config = $class->new()->post_process( $config );
29 }# end foreach()
30
31 3 return $config;
32 }# end parse()
33  
34 9 1;# return true:
35  
« ASP4/FileUpload.pm ↑ Summary ASP4/ConfigNode.pm »