line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Config::DB::Table; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
$Config::DB::Table::VERSION = '0.2'; |
4
|
|
|
|
|
|
|
|
5
|
3
|
|
|
3
|
|
14
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
99
|
|
6
|
3
|
|
|
3
|
|
12
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
71
|
|
7
|
|
|
|
|
|
|
|
8
|
3
|
|
|
3
|
|
13
|
use Carp; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
869
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $AUTOLOAD; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub AUTOLOAD { |
13
|
0
|
|
|
0
|
|
|
my ( $self, @pars ) = @_; |
14
|
0
|
|
|
|
|
|
my $name = $AUTOLOAD; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
$name =~ s/.*://; |
17
|
|
|
|
|
|
|
|
18
|
0
|
0
|
|
|
|
|
croak "Can't locate object method \"$name\" via package \"" |
19
|
|
|
|
|
|
|
. __PACKAGE__ . '"' |
20
|
|
|
|
|
|
|
unless $name =~ /^_/; |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
$name =~ s/^_//; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
return $self->get( $name, @pars ); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
|
|
sub DESTROY { |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub get { |
31
|
0
|
|
|
0
|
1
|
|
my ( $self, $key, $field ) = @_; |
32
|
|
|
|
|
|
|
|
33
|
0
|
0
|
|
|
|
|
croak __PACKAGE__ . "::get: missing key parameter" unless defined $key; |
34
|
0
|
0
|
|
|
|
|
croak __PACKAGE__ . "::get: missing key '$key' in configuration table" |
35
|
|
|
|
|
|
|
unless exists $self->{$key}; |
36
|
|
|
|
|
|
|
|
37
|
0
|
0
|
|
|
|
|
return $self->{$key} unless defined $field; |
38
|
|
|
|
|
|
|
|
39
|
0
|
0
|
|
|
|
|
croak __PACKAGE__ . "::get: unknown field '$field' for configuration table" |
40
|
|
|
|
|
|
|
unless exists $self->{$key}->{$field}; |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
return $self->{$key}->{$field}; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__END__ |