From: Rafael Kitover Date: Tue, 30 Jun 2009 01:39:51 +0000 (+0000) Subject: merge on_connect_call updates X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b25da5cf6ea3d93670943694d96f7cee57887029;p=dbsrgits%2FDBIx-Class-Historic.git merge on_connect_call updates --- diff --git a/lib/DBIx/Class/Storage/DBI/Sybase.pm b/lib/DBIx/Class/Storage/DBI/Sybase.pm index d298e05..fa31f68 100644 --- a/lib/DBIx/Class/Storage/DBI/Sybase.pm +++ b/lib/DBIx/Class/Storage/DBI/Sybase.pm @@ -62,20 +62,10 @@ sub _rebless { 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: diff --git a/t/746sybase.t b/t/746sybase.t index 2d0d491..2d18ef0 100644 --- a/t/746sybase.t +++ b/t/746sybase.t @@ -26,7 +26,13 @@ for my $storage_type (@storage_types) { 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;