line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Blikistan::MagicEngine::YamlConfig; |
2
|
1
|
|
|
1
|
|
3830
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
41
|
|
3
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
11
|
|
|
1
|
|
|
|
|
33
|
|
4
|
1
|
|
|
1
|
|
6
|
use base 'Blikistan::MagicEngine::TT2'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
340
|
|
5
|
|
|
|
|
|
|
use base 'Blikistan::MagicEngine::YamlConfig'; |
6
|
|
|
|
|
|
|
use Socialtext::WikiObject::YAML; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub load_config { |
9
|
|
|
|
|
|
|
my $self = shift; |
10
|
|
|
|
|
|
|
my $rester = $self->{rester}; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my $params = {}; |
13
|
|
|
|
|
|
|
eval { |
14
|
|
|
|
|
|
|
$params = Socialtext::WikiObject::YAML->new( |
15
|
|
|
|
|
|
|
rester => $rester, |
16
|
|
|
|
|
|
|
page => $self->{config_page}, |
17
|
|
|
|
|
|
|
)->as_hash; |
18
|
|
|
|
|
|
|
}; |
19
|
|
|
|
|
|
|
warn "Cannot parse yaml on page '$self->{config_page}': $@" if $@; |
20
|
|
|
|
|
|
|
return $params; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |