[Bast-commits] r6512 - DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI

caelum at dev.catalyst.perl.org caelum at dev.catalyst.perl.org
Thu Jun 4 23:28:19 GMT 2009


Author: caelum
Date: 2009-06-04 23:28:18 +0000 (Thu, 04 Jun 2009)
New Revision: 6512

Modified:
   DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm
Log:
set date format on _rebless correctly

Modified: DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm
===================================================================
--- DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm	2009-06-04 23:02:48 UTC (rev 6511)
+++ DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm	2009-06-04 23:28:18 UTC (rev 6512)
@@ -23,19 +23,29 @@
     if (!$exception && $dbtype && $self->load_optional_class($subclass)) {
       bless $self, $subclass;
       $self->_rebless;
-    } elsif (not $self->dbh->{syb_dynamic_supported}) {
-      bless $self, 'DBIx::Class::Storage:DBI::Sybase::NoBindVars';
-      $self->_rebless;
+    } else {
+      # real Sybase
+      if (not $self->dbh->{syb_dynamic_supported}) {
+        bless $self, 'DBIx::Class::Storage:DBI::Sybase::NoBindVars';
+        $self->_rebless;
+      }
+      $self->_init_date_fmt;
     }
   }
 }
 
+sub _populate_dbh {
+  my $self = shift;
+  $self->next::method(@_);
+  $self->_init_date_fmt;
+  1;
+}
+
 {
   my $old_dbd_warned = 0;
 
-  sub _populate_dbh {
+  sub _init_date_fmt {
     my $self = shift;
-    $self->next::method(@_);
     my $dbh = $self->_dbh;
 
     if ($dbh->can('syb_date_fmt')) {




More information about the Bast-commits mailing list