line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DBIx::Skinny::Mixin::DBHResolver; |
2
|
2
|
|
|
2
|
|
92717
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
84
|
|
3
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
264
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.04'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub register_method { |
7
|
|
|
|
|
|
|
+{ |
8
|
|
|
|
|
|
|
'dbh_resolver' => sub { |
9
|
0
|
|
|
0
|
|
0
|
my $class = shift; |
10
|
0
|
|
|
|
|
0
|
DBIx::Skinny::Mixin::DBHResolver::Base->new({skinny => $class}); |
11
|
|
|
|
|
|
|
}, |
12
|
|
|
|
|
|
|
}, |
13
|
1
|
|
|
1
|
0
|
38
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
package DBIx::Skinny::Mixin::DBHResolver::Base; |
16
|
2
|
|
|
2
|
|
2340
|
use DBIx::DBHResolver; |
|
2
|
|
|
|
|
160922
|
|
|
2
|
|
|
|
|
21
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new { |
19
|
0
|
|
|
0
|
|
|
my ($class, $args) = @_; |
20
|
0
|
|
|
|
|
|
bless $args, $class; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub conf { |
24
|
0
|
|
|
0
|
|
|
my ($self, $conf) = @_; |
25
|
0
|
|
|
|
|
|
DBIx::DBHResolver->config($conf); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
0
|
|
|
sub cluster { shift; DBIx::DBHResolver->cluster(@_) } |
|
0
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
|
|
sub connect_info { shift; DBIx::DBHResolver->connect_info(@_) } |
|
0
|
|
|
|
|
|
|
30
|
0
|
|
|
0
|
|
|
sub load { shift; DBIx::DBHResolver->load(@_) } |
|
0
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub connect { |
33
|
0
|
|
|
0
|
|
|
my $self = shift; |
34
|
0
|
|
|
|
|
|
$self->{skinny}->set_dbh(DBIx::DBHResolver->connect(@_)); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub connect_cached { |
38
|
0
|
|
|
0
|
|
|
my $self = shift; |
39
|
0
|
|
|
|
|
|
$self->{skinny}->set_dbh(DBIx::DBHResolver->connect_cached(@_)); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
__END__ |