Debian Codegraph @

lib/DBD/Mock/Pool.pm

raw
1 package DBD::Mock::Pool;
2
3 use strict;
4 use warnings;
5
6 my $connection;
7
8 sub connect {
9 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 shift unless ref $_[0];
14
15 my $drh = shift;
16 return $connection = bless $drh->connect(@_), 'DBD::Mock::Pool::db';
17 }
18
19 1;