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 40     40   279 use strict;
  40         77  
  40         1200  
4 40     40   213 use warnings;
  40         70  
  40         3504  
5              
6             my $connection;
7              
8             sub connect {
9 5 100   5 0 1522 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         3 my $drh = shift;
16 1         12 return $connection = bless $drh->connect(@_), 'DBD::Mock::Pool::db';
17             }
18              
19             1;