File: Pool.pm

package info (click to toggle)
libdbd-mock-perl 1.43-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 416 kB
  • sloc: perl: 1,135; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 372 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package DBD::Mock::Pool;

use strict;
use warnings;

my $connection;

sub connect {
    return $connection if $connection;

    # according to the code before my tweaks, this could be a class
    # name, but it was never used - DR, 2008-11-08
    shift unless ref $_[0];

    my $drh = shift;
    return $connection = bless $drh->connect(@_), 'DBD::Mock::Pool::db';
}

1;