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