Much simpler
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / Sybase.pm
index 43932fa..041aa2c 100644 (file)
@@ -88,9 +88,6 @@ EOF
             $self->_rebless;
           }
         }
-
-        $self->set_textsize; # based on LongReadLen in connect_info
-
       }
       elsif (not $self->_get_dbh->{syb_dynamic_supported}) {
         # not necessarily FreeTDS, but no placeholders nevertheless
@@ -101,12 +98,18 @@ EOF
 # this is highly unlikely, but we check just in case
         $self->auto_cast(1);
       }
-
-      $self->_set_max_connect(256);
     }
   }
 }
 
+sub _init {
+  my $self = shift;
+  $self->_set_max_connect(256);
+
+  # based on LongReadLen in connect_info
+  $self->set_textsize if $self->using_freetds;
+}
+
 # Make sure we have CHAINED mode turned on if AutoCommit is off in non-FreeTDS
 # DBD::Sybase (since we don't know how DBD::Sybase was compiled.) If however
 # we're using FreeTDS, CHAINED mode turns on an implicit transaction which we