line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Gantry::Conf::Provider::FlatFile::Config::General; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
##################################################################### |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Name : Gantry::Conf::Provider::FlatFile::Config::General; |
6
|
|
|
|
|
|
|
# Author : Frank Wiles |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# Description : Gantry::Conf provider that allows the use of |
9
|
|
|
|
|
|
|
# Config::General config files. |
10
|
|
|
|
|
|
|
# |
11
|
|
|
|
|
|
|
##################################################################### |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
39
|
|
14
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
4
|
use Carp qw(croak); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
83
|
|
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
1
|
|
6
|
use Config::General; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
19
|
1
|
|
|
1
|
|
583
|
use Gantry::Conf::Provider; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
20
|
1
|
|
|
1
|
|
5
|
use base qw( Gantry::Conf::Provider ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
186
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
#------------------------------------------------ |
23
|
|
|
|
|
|
|
# config |
24
|
|
|
|
|
|
|
#------------------------------------------------ |
25
|
|
|
|
|
|
|
# Configure ourself with a Config::General |
26
|
|
|
|
|
|
|
# config file |
27
|
|
|
|
|
|
|
#------------------------------------------------ |
28
|
|
|
|
|
|
|
sub config { |
29
|
9
|
|
|
9
|
1
|
12
|
my $self = shift; |
30
|
9
|
|
|
|
|
11
|
my $file = shift; |
31
|
|
|
|
|
|
|
|
32
|
9
|
50
|
|
|
|
42
|
my $config = Config::General->new( $file ) or |
33
|
|
|
|
|
|
|
croak "Unable to create Config::General object: $!"; |
34
|
|
|
|
|
|
|
|
35
|
8
|
|
|
|
|
5815
|
my %confs = $config->getall; |
36
|
|
|
|
|
|
|
|
37
|
8
|
|
|
|
|
149
|
return( \%confs ); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
} # END config |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |