| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package WWW::Marvel::Config::File; |
|
2
|
1
|
|
|
1
|
|
26860
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
39
|
|
|
3
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
25
|
|
|
4
|
1
|
|
|
1
|
|
5
|
use base qw/ WWW::Marvel::Config /; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
338
|
|
|
5
|
1
|
|
|
1
|
|
5
|
use Carp; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
41
|
|
|
6
|
1
|
|
|
1
|
|
466
|
use Config::Tiny; |
|
|
1
|
|
|
|
|
945
|
|
|
|
1
|
|
|
|
|
184
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my $DEFAULT_CONFIG_FILENAME = 'marvel.conf'; |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
|
11
|
2
|
|
|
2
|
0
|
634
|
my ($class, $config_filename) = @_; |
|
12
|
|
|
|
|
|
|
|
|
13
|
2
|
|
|
|
|
8
|
my $self = bless {}, $class; |
|
14
|
|
|
|
|
|
|
|
|
15
|
2
|
|
33
|
|
|
7
|
$config_filename //= $self->get_default_config_filename(); |
|
16
|
2
|
100
|
|
|
|
16
|
my $cfg = Config::Tiny->read( $config_filename ) |
|
17
|
|
|
|
|
|
|
or croak sprintf("problem with '%s' config: %s", $config_filename, Config::Tiny->errstr); |
|
18
|
1
|
|
|
|
|
248
|
$self->{'config_filename'} = $config_filename; |
|
19
|
|
|
|
|
|
|
|
|
20
|
1
|
|
|
|
|
13
|
$self->_set_keys( $cfg->{auth} ); |
|
21
|
1
|
|
|
|
|
12
|
return $self; |
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
0
|
0
|
sub get_default_config_filename { $DEFAULT_CONFIG_FILENAME } |
|
25
|
|
|
|
|
|
|
|
|
26
|
1
|
|
|
1
|
0
|
8
|
sub get_config_filename { shift->{'config_filename'} } |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |