Patch up weird MRO fail on 5.8 perls
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / Sybase / Microsoft_SQL_Server.pm
index ff9223a..5f904d8 100644 (file)
@@ -10,13 +10,15 @@ use base qw/
 use mro 'c3';
 use Carp::Clan qw/^DBIx::Class/;
 
+# Temporary fix for mysterious MRO fail on 5.8 perls
+Class::C3::reinitialize if $] < '5.01';
+
 sub _rebless {
   my $self = shift;
   my $dbh  = $self->_get_dbh;
 
   return if ref $self ne __PACKAGE__;
-
-  if (not $self->_typeless_placeholders_supported) {
+  if (not $self->_use_typeless_placeholders) {
     require
       DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server::NoBindVars;
     bless $self,
@@ -59,7 +61,7 @@ sub _dbh_rollback {
 sub _get_server_version {
   my $self = shift;
 
-  my $product_version = $self->_get_dbh->selectrow_hashref('xp_msver ProductVersion');
+  my $product_version = $self->_get_dbh->selectrow_hashref('master.dbo.xp_msver ProductVersion');
 
   if ((my $version = $product_version->{Character_Value}) =~ /^(\d+)\./) {
     return $version;