From: Rafael Kitover Date: Wed, 17 Jun 2009 14:25:28 +0000 (+0000) Subject: rename and document dt setup method, will be an on_connect_call at later merge point X-Git-Tag: v0.08112~14^2~129 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9539eeb15c1a77b6385a659579666114786e1a72;p=dbsrgits%2FDBIx-Class.git rename and document dt setup method, will be an on_connect_call at later merge point --- diff --git a/lib/DBIx/Class/Storage/DBI/Sybase.pm b/lib/DBIx/Class/Storage/DBI/Sybase.pm index e60b5e2..a46163b 100644 --- a/lib/DBIx/Class/Storage/DBI/Sybase.pm +++ b/lib/DBIx/Class/Storage/DBI/Sybase.pm @@ -29,7 +29,7 @@ sub _rebless { bless $self, 'DBIx::Class::Storage:DBI::Sybase::NoBindVars'; $self->_rebless; } - $self->_init_date_fmt; + $self->connect_call_datetime_setup; } } } @@ -37,14 +37,30 @@ sub _rebless { sub _populate_dbh { my $self = shift; $self->next::method(@_); - $self->_init_date_fmt; + $self->connect_call_datetime_setup; 1; } { my $old_dbd_warned = 0; - sub _init_date_fmt { +=head2 connect_call_datetime_setup + +Used as: + + on_connect_call => 'datetime_setup' + +In L to set: + + $dbh->syb_date_fmt('ISO_strict'); + $dbh->do('set dateformat mdy'); + +On connection for use with L, using +L. + +=cut + + sub connect_call_datetime_setup { my $self = shift; my $dbh = $self->_dbh;