don't run connection actions if ->_rebless does not connect
Rafael Kitover [Fri, 17 Jul 2009 09:47:31 +0000 (09:47 +0000)]
lib/DBIx/Class/Storage/DBI.pm

index 55305aa..040a388 100644 (file)
@@ -817,7 +817,8 @@ sub _determine_driver {
       $self->_rebless();
     }
 
-    $self->_run_connection_actions if $started_unconnected;
+    $self->_run_connection_actions
+        if $started_unconnected && defined $self->_dbh;
   }
 }