Mock/Pool.pm

filter: Statementstmt 100% 12 / 12 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 0.0% 0 / 1 totaltotal 90.0% 18 / 20 CC 3 SCAR 7.9
CC
3
Cov
94%
connect
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.2
« Mock/StatementTrack.pm ↑ Summary Mock.pm »
1 package DBD::Mock::Pool;
2  
3 41 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 41 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 41 my $connection;
7  
8 5 ▶sub connect {
Subroutine connect: called CC=3 SCAR=11.0
Pod undocumented
9 5 ▶ return $connection if $connection;
Branch: 1 branch
BranchTrueFalseTotal
if $connection 4 1 5
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 ▶ shift unless ref $_[0];
Branch: 1 branch
BranchTrueFalseTotal
unless ref $_[0] 0 1 1
14  
15 1 my $drh = shift;
16 1 return $connection = bless $drh->connect(@_), 'DBD::Mock::Pool::db';
17 }
18  
19 41 1;
« Mock/StatementTrack.pm ↑ Summary Mock.pm »