blib/lib/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
« blib/lib/ASP4/Request.pm ↑ Summary blib/lib/ASP4/FileUpload.pm »
1  
2 package
3 ASP4::ConfigParser;
4  
5 15 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 15 ▶use warnings 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
7 15 ▶use ASP4::Config;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9  
10 sub new
11 15 ▶{
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
12 15 my ($class) = @_;
13
14 15 return bless { }, $class;
15 }# end new()
16  
17  
18 sub parse
19 15 ▶{
Subroutine parse: called CC=3 SCAR=15.1
Pod undocumented
20 15 my ($s, $doc, $root) = @_;
21
22 15 my $config = ASP4::Config->new( $doc, $root );
23
24 # Now do any post-processing:
25 15 foreach my $class ( $config->system->post_processors )
26 {
27 0 (my $file = "$class.pm") =~ s/::/\//;
28 0 ▶ require $file unless $INC{$file};
Branch: 1 branch
BranchTrueFalseTotal
unless $INC{$file} 0 0 0
29 0 $config = $class->new()->post_process( $config );
30 }# end foreach()
31
32 15 return $config;
33 }# end parse()
34  
35 15 1;# return true:
36  
« blib/lib/ASP4/Request.pm ↑ Summary blib/lib/ASP4/FileUpload.pm »