| 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
| |||||||||||
| 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 | |||||||||||