line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::ReluctantORM::DBH::WrapDBI; |
2
|
|
|
|
|
|
|
|
3
|
42
|
|
|
42
|
|
224
|
use warnings; |
|
42
|
|
|
|
|
77
|
|
|
42
|
|
|
|
|
1201
|
|
4
|
42
|
|
|
42
|
|
211
|
use strict; |
|
42
|
|
|
|
|
81
|
|
|
42
|
|
|
|
|
1495
|
|
5
|
42
|
|
|
42
|
|
216
|
use Scalar::Util qw(blessed); |
|
42
|
|
|
|
|
76
|
|
|
42
|
|
|
|
|
5662
|
|
6
|
|
|
|
|
|
|
|
7
|
42
|
|
|
42
|
|
252
|
use base 'Class::ReluctantORM::DBH'; |
|
42
|
|
|
|
|
93
|
|
|
42
|
|
|
|
|
6362
|
|
8
|
42
|
|
|
42
|
|
246
|
use base 'Class::Accessor'; |
|
42
|
|
|
|
|
88
|
|
|
42
|
|
|
|
|
54576
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Class::ReluctantORM::DBH::WrapDBI - Wrap a DBI database handle |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 DESCRIPTION |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Thin wrapper around a DBI dbh to match Class::ReluctantORM::DBH's interface. |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=cut |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw(dbi_dbh)); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub new { |
23
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
24
|
0
|
|
|
|
|
|
my $dbi_dbh = shift; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# Check class? |
27
|
0
|
|
|
|
|
|
my $self = bless {}, $class; |
28
|
0
|
|
|
|
|
|
$self->dbi_dbh($dbi_dbh); |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
return $self; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub get_info { |
34
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
35
|
0
|
|
|
|
|
|
return $self->dbi_dbh->get_info(@_); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub set_handle_error { |
39
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
40
|
0
|
|
|
|
|
|
my $coderef = shift; |
41
|
0
|
|
|
|
|
|
$self->dbi_dbh->{HandleError} = $coderef; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub prepare { |
45
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
46
|
0
|
|
|
|
|
|
return $self->dbi_dbh->prepare(@_); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub column_info { |
50
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
51
|
0
|
|
|
|
|
|
return $self->dbi_dbh->column_info(@_); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |