| 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
| |||||||||||
| 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
| |||||||||||
| 14 | |||||||||||
| 15 | 1 | my $drh = shift; | |||||||||
| 16 | 1 | return $connection = bless $drh->connect(@_), 'DBD::Mock::Pool::db'; | |||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 41 | 1; | |||||||||