Switch to C3 mro throughout the ::Storage hierarchy (DBIx::Class brings in MRO::Compa...
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / Sybase.pm
index 1a63bc8..0a2cfb8 100644 (file)
@@ -3,7 +3,11 @@ 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;
@@ -20,9 +24,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;