by setting conn_?id first, we prevent $storage->dbh from recursing through on_connect...
Ricardo Signes [Fri, 9 Jan 2009 01:55:53 +0000 (01:55 +0000)]
lib/DBIx/Class/Storage/DBI.pm

index fde1fa8..d6a61b7 100644 (file)
@@ -911,11 +911,11 @@ sub _populate_dbh {
     }
   }
 
-  my $connection_do = $self->on_connect_do;
-  $self->_do_connection_actions($connection_do) if ref($connection_do);
-
   $self->_conn_pid($$);
   $self->_conn_tid(threads->tid) if $INC{'threads.pm'};
+
+  my $connection_do = $self->on_connect_do;
+  $self->_do_connection_actions($connection_do) if ref($connection_do);
 }
 
 sub _do_connection_actions {