Newer Older
42 lines | 0.706kb
packaging one directory
yuki-kimoto authored on 2009-11-16
1
package DBIx::Custom::SQLite;
2

            
3
use strict;
update document
yuki-kimoto authored on 2009-11-17
4
use warnings;
rename DBIx::Custom::SQLite ...
yuki-kimoto authored on 2010-01-30
5

            
update document
yuki-kimoto authored on 2010-05-27
6
use base 'DBIx::Custom';
7

            
8
__PACKAGE__->attr('database');
9

            
packaging one directory
yuki-kimoto authored on 2009-11-16
10
sub connect {
update document
yuki-kimoto authored on 2010-05-27
11
    my $proto = shift;
12
    
cleanup
yuki-kimoto authored on 2010-08-05
13
    # Create a new object
update document
yuki-kimoto authored on 2010-05-27
14
    my $self = ref $proto ? $proto : $proto->new(@_);
packaging one directory
yuki-kimoto authored on 2009-11-16
15
    
cleanup
yuki-kimoto authored on 2010-08-05
16
    # Data source
add tests
yuki-kimoto authored on 2010-08-10
17
    my $database = $self->database;
18
    if (!$self->data_source && $database) {
19
        $self->data_source("dbi:SQLite:dbname=$database")
packaging one directory
yuki-kimoto authored on 2009-11-16
20
    }
21
    
22
    return $self->SUPER::connect;
23
}
24

            
25
sub connect_memory {
removed DESTROY method(not b...
yuki-kimoto authored on 2010-07-18
26
    my $self = shift->new(@_);
packaging one directory
yuki-kimoto authored on 2009-11-16
27
    
cleanup
yuki-kimoto authored on 2010-08-05
28
    # Data source
packaging one directory
yuki-kimoto authored on 2009-11-16
29
    $self->data_source('dbi:SQLite:dbname=:memory:');
30
    
cleanup
yuki-kimoto authored on 2010-08-05
31
    # Connect to database
packaging one directory
yuki-kimoto authored on 2009-11-16
32
    $self->connect;
33
    
34
    return $self;
35
}
36

            
removed register_format()
yuki-kimoto authored on 2010-05-26
37
1;
38

            
packaging one directory
yuki-kimoto authored on 2009-11-16
39
=head1 NAME
40

            
added table not specified ex...
Yuki Kimoto authored on 2011-01-21
41
DBIx::Custom::SQLite - DEPRECATED!
packaging one directory
yuki-kimoto authored on 2009-11-16
42