« blib/lib/DBIx/Class/Schema/Loader/DBI/SQLAnywhere.pm
↑ Summary
blib/lib/DBIx/Class/Schema/Loader/DBI/ODBC/Firebird.pm »
| 1 | package DBIx::Class::Schema::Loader::DBI::ODBC; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 1 | ▶ | use base 'DBIx::Class::Schema::Loader::DBI'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 1 | ▶ | use mro 'c3'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 1 | our $VERSION = '0.07053'; | |||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | =head1 NAME | ||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | DBIx::Class::Schema::Loader::DBI::ODBC - L<DBD::ODBC> proxy | ||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | Reblesses into an C<::ODBC::> class when connecting via L<DBD::ODBC>. | ||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | Code stolen from the L<DBIx::Class> ODBC storage. | ||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | See L<DBIx::Class::Schema::Loader::Base> for usage information. | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | =cut | ||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | 0 | ▶ | sub _rebless { | ||||||||||||||||||||||||||
|
Subroutine
_rebless: not called CC=5 SCAR=34.0
| |||||||||||||||||||||||||||||
| 25 | 0 | my $self = shift; | |||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | 0 | ▶ | return if ref $self ne __PACKAGE__; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | # stolen from DBIC ODBC storage | ||||||||||||||||||||||||||||
| 30 | 0 | my $dbh = $self->schema->storage->dbh; | |||||||||||||||||||||||||||
| 31 | 0 | my $dbtype = eval { $dbh->get_info(17) }; | |||||||||||||||||||||||||||
| 32 | 0 | ▶ | unless ( $@ ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 33 | # Translate the backend name into a perl identifier | ||||||||||||||||||||||||||||
| 34 | 0 | $dbtype =~ s/\W/_/gi; | |||||||||||||||||||||||||||
| 35 | 0 | my $class = "DBIx::Class::Schema::Loader::DBI::ODBC::${dbtype}"; | |||||||||||||||||||||||||||
| 36 | 0 | ▶ | if ($self->load_optional_class($class) && !$self->isa($class)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$self->load_optional_class($class) and not $self->isa($class)
MC/DC0%0/2
$self->load_optional_class($class) and not $self->isa($class)
$self->load_optional_class($class)
not $self->isa($class)
Truth table0%0/3
A and not(B)
A= $self->load_optional_class($class)B= not $self->isa($class)
| |||||||||||||||||||||||||||||
| 37 | 0 | bless $self, $class; | |||||||||||||||||||||||||||
| 38 | 0 | $self->_rebless; | |||||||||||||||||||||||||||
| 39 | } | ||||||||||||||||||||||||||||
| 40 | } | ||||||||||||||||||||||||||||
| 41 | } | ||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | =head1 SEE ALSO | ||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | L<DBIx::Class::Schema::Loader::DBI::ODBC::Microsoft_SQL_Server>, | ||||||||||||||||||||||||||||
| 46 | L<DBIx::Class::Schema::Loader::DBI::ODBC::SQL_Anywhere>, | ||||||||||||||||||||||||||||
| 47 | L<DBIx::Class::Schema::Loader::DBI::ODBC::Firebird>, | ||||||||||||||||||||||||||||
| 48 | L<DBIx::Class::Schema::Loader>, L<DBIx::Class::Schema::Loader::Base>, | ||||||||||||||||||||||||||||
| 49 | L<DBIx::Class::Schema::Loader::DBI> | ||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||
| 51 | =head1 AUTHORS | ||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||
| 53 | See L<DBIx::Class::Schema::Loader/AUTHORS>. | ||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||
| 55 | =head1 LICENSE | ||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | This library is free software; you can redistribute it and/or modify it under | ||||||||||||||||||||||||||||
| 58 | the same terms as Perl itself. | ||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||
| 60 | =cut | ||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||
| 62 | 1 | 1; | |||||||||||||||||||||||||||