line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Aspect::Loader::Configuration::YAML; |
2
|
3
|
|
|
3
|
|
58329
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
103
|
|
3
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
96
|
|
4
|
3
|
|
|
3
|
|
1508
|
use YAML qw(LoadFile); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use base qw(Aspect::Loader::Configuration); |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub new{ |
8
|
|
|
|
|
|
|
my $class = shift; |
9
|
|
|
|
|
|
|
my $file_path = shift; |
10
|
|
|
|
|
|
|
my $self = $class->SUPER::new; |
11
|
|
|
|
|
|
|
$self->load_configuration($file_path); |
12
|
|
|
|
|
|
|
return $self; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub load_configuration{ |
16
|
|
|
|
|
|
|
my $self = shift; |
17
|
|
|
|
|
|
|
my $file_path = shift; |
18
|
|
|
|
|
|
|
my $conf = LoadFile($file_path); |
19
|
|
|
|
|
|
|
foreach my $conf ( @{$conf->{aspects}}){ |
20
|
|
|
|
|
|
|
push @{$self->{_configuration}},$conf; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |