[Bast-commits] r3357 - branches/DBIx-Class-current/lib/DBIx/Class/Storage

blblack at dev.catalyst.perl.org blblack at dev.catalyst.perl.org
Tue May 22 02:44:58 GMT 2007


Author: blblack
Date: 2007-05-22 02:44:57 +0100 (Tue, 22 May 2007)
New Revision: 3357

Modified:
   branches/DBIx-Class-current/lib/DBIx/Class/Storage/DBI.pm
Log:
cleanup on aisle 7

Modified: branches/DBIx-Class-current/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- branches/DBIx-Class-current/lib/DBIx/Class/Storage/DBI.pm	2007-05-22 01:40:14 UTC (rev 3356)
+++ branches/DBIx-Class-current/lib/DBIx/Class/Storage/DBI.pm	2007-05-22 01:44:57 UTC (rev 3357)
@@ -467,6 +467,8 @@
   $self->_connect_info($info_arg);
 
   my $dbi_info = [@$info_arg]; # copy for DBI
+  $self->_dbi_connect_info($dbi_info);
+
   my $last_info = $dbi_info->[-1];
   if(ref $last_info eq 'HASH') {
     for my $storage_opt (qw/on_connect_do disable_sth_caching/) {
@@ -484,28 +486,7 @@
     pop(@$dbi_info) if !keys %$last_info;
   }
 
-  $self->_dbi_connect_info($dbi_info);
-
-  if(ref $dbi_info->[0] ne 'CODE') {
-      # Extend to 3 arguments with undefs, if necessary
-      while(scalar(@$dbi_info) < 3) { push(@$dbi_info, undef) }
-
-      # Complain if 4th argument is defined and is not a HASH
-      if(defined $dbi_info->[3] && ref $dbi_info->[3] ne 'HASH') {
-          warn "4th argument of DBI connect info is defined "
-               . " but is not a hashref!";
-      }
-
-      # Set AutoCommit to 1 if not specified manually
-      else {
-          $dbi_info->[3] ||= {};
-          if(!defined $dbi_info->[3]->{AutoCommit}) {
-              $dbi_info->[3]->{AutoCommit} = 1;
-          }
-      }
-  }
-
-  $self->_connect_info;
+  $info_arg;
 }
 
 =head2 on_connect_do




More information about the Bast-commits mailing list