X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FSybase.pm;h=41b0c81bb297e2557717b25f779ed064c3832335;hb=26283ee38f220f6c6bae720ea5a189c9c0f47f6f;hp=1a63bc87132eb399f58649a5d045e380a21d7115;hpb=a964a928b10f79f18e4e3f5dbf2380174a0f7ca2;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/Sybase.pm b/lib/DBIx/Class/Storage/DBI/Sybase.pm index 1a63bc8..41b0c81 100644 --- a/lib/DBIx/Class/Storage/DBI/Sybase.pm +++ b/lib/DBIx/Class/Storage/DBI/Sybase.pm @@ -3,12 +3,20 @@ package DBIx::Class::Storage::DBI::Sybase; use strict; use warnings; -use base qw/DBIx::Class::Storage::DBI::NoBindVars/; +use base qw/ + DBIx::Class::Storage::DBI::Sybase::Base + DBIx::Class::Storage::DBI::NoBindVars +/; +use mro 'c3'; sub _rebless { my $self = shift; - my $dbtype = eval { @{$self->dbh->selectrow_arrayref(qq{sp_server_info \@attribute_id=1})}[2] }; + my $dbtype = eval { + @{$self->_get_dbh + ->selectrow_arrayref(qq{sp_server_info \@attribute_id=1}) + }[2] + }; unless ( $@ ) { $dbtype =~ s/\W/_/gi; my $subclass = "DBIx::Class::Storage::DBI::Sybase::${dbtype}"; @@ -20,9 +28,8 @@ sub _rebless { } sub _dbh_last_insert_id { - my $self = shift; - my $sth = $self->_dbh->prepare_cached('select @@identity'); - ($self->_dbh->selectrow_array($sth))[0]; + my ($self, $dbh, $source, $col) = @_; + return ($dbh->selectrow_array('select @@identity'))[0]; } 1;