line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Config::DB::Record; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
$Config::DB::Record::VERSION = '0.2'; |
4
|
|
|
|
|
|
|
|
5
|
3
|
|
|
3
|
|
13
|
use strict; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
85
|
|
6
|
3
|
|
|
3
|
|
12
|
use warnings; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
57
|
|
7
|
|
|
|
|
|
|
|
8
|
3
|
|
|
3
|
|
12
|
use Carp; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
840
|
|
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, $field ) = @_; |
32
|
|
|
|
|
|
|
|
33
|
0
|
0
|
|
|
|
|
croak __PACKAGE__ . "::get: missing field parameter" unless defined $field; |
34
|
0
|
0
|
|
|
|
|
croak __PACKAGE__ . "::get: unknown field '$field' for configuration table" |
35
|
|
|
|
|
|
|
unless exists $self->{$field}; |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
return $self->{$field}; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |