line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
3269
|
use strict; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
34
|
|
2
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
142
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package DBIx::Poggy::Error; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
my @fields = qw(err errstr state); |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
0
|
|
|
0
|
0
|
|
my $proto = shift; |
10
|
0
|
|
0
|
|
|
|
my $dbh = shift || 'DBI'; |
11
|
0
|
|
0
|
|
|
|
my $self = bless {}, ref($proto) || $proto; |
12
|
0
|
|
|
|
|
|
foreach my $f ( @fields ) { |
13
|
0
|
|
|
|
|
|
$self->{$f} = $dbh->$f(); |
14
|
|
|
|
|
|
|
} |
15
|
0
|
|
|
|
|
|
return $self; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
foreach my $f ( @fields ) { |
19
|
1
|
|
|
1
|
|
7
|
no strict 'refs'; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
65
|
|
20
|
0
|
|
|
0
|
|
|
*{$f} = sub { return $_[0]->{$f} }; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |