File Coverage

blib/lib/DBD/Mock/Pool.pm
Criterion Covered Total %
statement 10 10 100.0
branch 3 4 75.0
condition n/a
subroutine 3 3 100.0
pod 0 1 0.0
total 16 18 88.8


line stmt bran cond sub pod time code
1             package DBD::Mock::Pool;
2              
3 39     39   274 use strict;
  39         79  
  39         1190  
4 39     39   201 use warnings;
  39         65  
  39         3800  
5              
6             my $connection;
7              
8             sub connect {
9 5 100   5 0 1492 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       4 shift unless ref $_[0];
14              
15 1         3 my $drh = shift;
16 1         10 return $connection = bless $drh->connect(@_), 'DBD::Mock::Pool::db';
17             }
18              
19             1;