[Bast-commits] r6867 - in DBIx-Class/0.08/branches/sybase: lib/DBIx/Class/Storage/DBI t

caelum at dev.catalyst.perl.org caelum at dev.catalyst.perl.org
Tue Jun 30 01:39:52 GMT 2009


Author: caelum
Date: 2009-06-30 01:39:51 +0000 (Tue, 30 Jun 2009)
New Revision: 6867

Modified:
   DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm
   DBIx-Class/0.08/branches/sybase/t/746sybase.t
Log:
merge on_connect_call updates

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-30 01:34:02 UTC (rev 6866)
+++ DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm	2009-06-30 01:39:51 UTC (rev 6867)
@@ -62,20 +62,10 @@
         bless $self, 'DBIx::Class::Storage:DBI::Sybase::NoBindVars';
         $self->_rebless;
       }
-      $self->connect_call_datetime_setup;
-      $self->connect_call_blob_setup;
     }
   }
 }
 
-sub _populate_dbh {
-  my $self = shift;
-  $self->next::method(@_);
-  $self->connect_call_datetime_setup;
-  $self->connect_call_blob_setup;
-  1;
-}
-
 =head2 connect_call_blob_setup
 
 Used as:

Modified: DBIx-Class/0.08/branches/sybase/t/746sybase.t
===================================================================
--- DBIx-Class/0.08/branches/sybase/t/746sybase.t	2009-06-30 01:34:02 UTC (rev 6866)
+++ DBIx-Class/0.08/branches/sybase/t/746sybase.t	2009-06-30 01:39:51 UTC (rev 6867)
@@ -26,7 +26,13 @@
   unless ($storage_type eq 'DBI::Sybase') { # autodetect
     $schema->storage_type("::$storage_type");
   }
-  $schema->connection($dsn, $user, $pass, {AutoCommit => 1});
+  $schema->connection($dsn, $user, $pass, {
+    AutoCommit => 1,
+    on_connect_call => [
+      [ 'datetime_setup' ],
+      [ blob_setup => log_on_update => 1 ], # this is a safer option
+    ],
+  });
 
   $schema->storage->ensure_connected;
 




More information about the Bast-commits mailing list