allow undef for _setup_connect_do
Rafael Kitover [Sat, 13 Jun 2009 15:31:52 +0000 (15:31 +0000)]
lib/DBIx/Class/Storage/DBI.pm

index a049167..26fcbbb 100644 (file)
@@ -478,8 +478,11 @@ sub _setup_connect_do {
 
   my $val = shift;
 
-  $self->throw_exception("The value of $opt cannot be 'undef'")
-    unless defined $val;
+  if (not defined $val) {
+    $self->$accessor(undef);
+    $self->$store(undef);
+    return;
+  }
 
   my @store;