line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DBD::Mock::Pool; |
2
|
|
|
|
|
|
|
|
3
|
40
|
|
|
40
|
|
289
|
use strict; |
|
40
|
|
|
|
|
106
|
|
|
40
|
|
|
|
|
1229
|
|
4
|
40
|
|
|
40
|
|
207
|
use warnings; |
|
40
|
|
|
|
|
72
|
|
|
40
|
|
|
|
|
3805
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
my $connection; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub connect { |
9
|
5
|
100
|
|
5
|
0
|
1651
|
return $connection if $connection; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# according to the code before my tweaks, this could be a class |
12
|
|
|
|
|
|
|
# name, but it was never used - DR, 2008-11-08 |
13
|
1
|
50
|
|
|
|
5
|
shift unless ref $_[0]; |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
|
|
2
|
my $drh = shift; |
16
|
1
|
|
|
|
|
13
|
return $connection = bless $drh->connect(@_), 'DBD::Mock::Pool::db'; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
1; |