Merge 'trunk' into 'sybase_mssql'
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / Sybase.pm
CommitLineData
f68f4d44 1package DBIx::Class::Storage::DBI::Sybase;
2
3use strict;
4use warnings;
5
6use base qw/DBIx::Class::Storage::DBI::NoBindVars/;
7
47d9646a 8sub _rebless {
9 my $self = shift;
10
98464041 11 my $dbtype = eval { @{$self->_dbh->selectrow_arrayref(qq{sp_server_info \@attribute_id=1})}[2] };
12 unless ( $@ ) {
13 $dbtype =~ s/\W/_/gi;
14 my $subclass = "DBIx::Class::Storage::DBI::Sybase::${dbtype}";
47d9646a 15 if ($self->load_optional_class($subclass) && !$self->isa($subclass)) {
16 bless $self, $subclass;
17 $self->_rebless;
18 }
19 }
20}
21
f68f4d44 221;
23
24=head1 NAME
25
26DBIx::Class::Storage::DBI::Sybase - Storage::DBI subclass for Sybase
27
28=head1 SYNOPSIS
29
30This subclass supports L<DBD::Sybase> for real Sybase databases. If
31you are using an MSSQL database via L<DBD::Sybase>, see
32L<DBIx::Class::Storage::DBI::Sybase::MSSQL>.
33
34=head1 AUTHORS
35
36Brandon L Black <blblack@gmail.com>
37
47d9646a 38Justin Hunter <justin.d.hunter@gmail.com>
39
f68f4d44 40=head1 LICENSE
41
42You may distribute this code under the same terms as Perl itself.
43
44=cut