blib/lib/DBX.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 1 | 3 | 33.3 |
branch | n/a | ||
condition | n/a | ||
subroutine | 1 | 1 | 100.0 |
pod | n/a | ||
total | 2 | 4 | 50.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package DBX; | ||||||
2 | |||||||
3 | 1 | 1 | 51949 | use DBI; | |||
0 | |||||||
0 | |||||||
4 | use DBX::Connection; | ||||||
5 | use DBX::Recordset; | ||||||
6 | use DBX::Constants; | ||||||
7 | |||||||
8 | use strict; | ||||||
9 | use warnings; | ||||||
10 | |||||||
11 | our $VERSION = '0.1'; | ||||||
12 | |||||||
13 | sub AUTOLOAD | ||||||
14 | { | ||||||
15 | our $AUTOLOAD; | ||||||
16 | my $driver = (split /::/, $AUTOLOAD)[-1]; | ||||||
17 | my $class = shift; | ||||||
18 | my $source = shift; | ||||||
19 | |||||||
20 | DBX::Connection->new(DBI->connect("dbi:$driver:$source", @_)); | ||||||
21 | } | ||||||
22 | |||||||
23 | 1; | ||||||
24 | __END__ |