| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package App::I18N::Config; |
|
2
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
45
|
|
|
3
|
1
|
|
|
1
|
|
6
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
27
|
|
|
4
|
1
|
|
|
1
|
|
5
|
use File::Spec; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
28
|
|
|
5
|
1
|
|
|
1
|
|
6
|
use YAML::XS; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
222
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $CONFIG; |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub configfile { |
|
10
|
0
|
|
|
0
|
0
|
|
return File::Spec->catfile( 'etc', 'po.yml' ); |
|
11
|
|
|
|
|
|
|
} |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub exists { |
|
14
|
0
|
|
|
0
|
0
|
|
return -e File::Spec->catfile( 'etc' , 'po.yml' ); |
|
15
|
|
|
|
|
|
|
} |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub read { |
|
18
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
|
19
|
0
|
|
0
|
|
|
|
my $configfile = shift || $class->configfile; |
|
20
|
0
|
0
|
|
|
|
|
if( -e $configfile ) { |
|
21
|
0
|
|
0
|
|
|
|
return $CONFIG ||= YAML::XS::LoadFile($configfile); |
|
22
|
|
|
|
|
|
|
} |
|
23
|
0
|
|
|
|
|
|
return; |
|
24
|
|
|
|
|
|
|
} |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |