Newer Older
60 lines | 1.285kb
add Oracle, DB2, Pg,
yuki-kimoto authored on 2009-11-16
1
package DBIx::Custom::ODBC;
packaging one directory
yuki-kimoto authored on 2009-11-16
2
use base 'DBIx::Custom::Basic';
3

            
4
use warnings;
5
use strict;
6

            
7
my $class = __PACKAGE__;
8

            
9
sub connect {
10
    my $self = shift;
11
    
12
    if (!$self->data_source && (my $database = $self->database)) {
add Oracle, DB2, Pg,
yuki-kimoto authored on 2009-11-16
13
        $self->data_source("dbi:ODBC:dbname=$database");
packaging one directory
yuki-kimoto authored on 2009-11-16
14
    }
15
    
16
    return $self->SUPER::connect;
17
}
18

            
19
=head1 NAME
20

            
add Oracle, DB2, Pg,
yuki-kimoto authored on 2009-11-16
21
DBIx::Custom::ODBC - DBIx::Custom ODBC implementation
packaging one directory
yuki-kimoto authored on 2009-11-16
22

            
23
=head1 Version
24

            
25
Version 0.0102
26

            
27
=head1 Synopsys
28

            
29
=head1 See DBIx::Custom and DBI::Custom::Basic documentation
30

            
31
This class is L<DBIx::Custom::Basic> subclass,
32
and L<DBIx::Custom::Basic> is L<DBIx::Custom> subclass.
33

            
34
You can use all methods of L<DBIx::Custom::Basic> and <DBIx::Custom>
35
Please see L<DBIx::Custom::Basic> and <DBIx::Custom> documentation.
36

            
37
=head1 Object methods
38

            
39
=head2 connect
40

            
41
    This method override DBIx::Custom::connect
42
    
43
    If database attribute is set, automatically data source is created and connect
44

            
45
=head1 Author
46

            
47
Yuki Kimoto, C<< <kimoto.yuki at gmail.com> >>
48

            
49
Github L<http://github.com/yuki-kimoto>
50

            
51
I develope this module L<http://github.com/yuki-kimoto/DBIx-Custom>
52

            
53
=head1 Copyright & license
54

            
55
Copyright 2009 Yuki Kimoto, all rights reserved.
56

            
57
This program is free software; you can redistribute it and/or modify it
58
under the same terms as Perl itself.
59

            
60