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

caelum at dev.catalyst.perl.org caelum at dev.catalyst.perl.org
Wed Jun 17 14:25:28 GMT 2009


Author: caelum
Date: 2009-06-17 14:25:28 +0000 (Wed, 17 Jun 2009)
New Revision: 6699

Modified:
   DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm
Log:
rename and document dt setup method, will be an on_connect_call at later merge point

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-17 08:32:30 UTC (rev 6698)
+++ DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm	2009-06-17 14:25:28 UTC (rev 6699)
@@ -29,7 +29,7 @@
         bless $self, 'DBIx::Class::Storage:DBI::Sybase::NoBindVars';
         $self->_rebless;
       }
-      $self->_init_date_fmt;
+      $self->connect_call_datetime_setup;
     }
   }
 }
@@ -37,14 +37,30 @@
 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<DBIx::Class::Storage::DBI/connect_info> to set:
+
+  $dbh->syb_date_fmt('ISO_strict');
+  $dbh->do('set dateformat mdy');
+
+On connection for use with L<DBIx::Class::InflateColumn::DateTime>, using
+L<DateTime::Format::Sybase>.
+
+=cut
+
+  sub connect_call_datetime_setup {
     my $self = shift;
     my $dbh = $self->_dbh;
 




More information about the Bast-commits mailing list