packaging one directory
|
1 |
package DBIx::Custom::SQLite; |
2 | ||
3 |
use strict; |
|
update document
|
4 |
use warnings; |
rename DBIx::Custom::SQLite ...
|
5 | |
update document
|
6 |
use base 'DBIx::Custom'; |
7 | ||
8 |
__PACKAGE__->attr('database'); |
|
9 | ||
packaging one directory
|
10 |
sub connect { |
update document
|
11 |
my $proto = shift; |
12 |
|
|
cleanup
|
13 |
# Create a new object |
update document
|
14 |
my $self = ref $proto ? $proto : $proto->new(@_); |
packaging one directory
|
15 |
|
cleanup
|
16 |
# Data source |
add tests
|
17 |
my $database = $self->database; |
18 |
if (!$self->data_source && $database) { |
|
19 |
$self->data_source("dbi:SQLite:dbname=$database") |
|
packaging one directory
|
20 |
} |
21 |
|
|
22 |
return $self->SUPER::connect; |
|
23 |
} |
|
24 | ||
25 |
sub connect_memory { |
|
removed DESTROY method(not b...
|
26 |
my $self = shift->new(@_); |
packaging one directory
|
27 |
|
cleanup
|
28 |
# Data source |
packaging one directory
|
29 |
$self->data_source('dbi:SQLite:dbname=:memory:'); |
30 |
|
|
cleanup
|
31 |
# Connect to database |
packaging one directory
|
32 |
$self->connect; |
33 |
|
|
34 |
return $self; |
|
35 |
} |
|
36 | ||
removed register_format()
|
37 |
1; |
38 | ||
packaging one directory
|
39 |
=head1 NAME |
40 | ||
added table not specified ex...
|
41 |
DBIx::Custom::SQLite - DEPRECATED! |
packaging one directory
|
42 |