[Bps-public-commit] r14415 - in Prophet/trunk: .

sartak at bestpractical.com sartak at bestpractical.com
Tue Jul 22 23:59:49 EDT 2008


Author: sartak
Date: Tue Jul 22 23:59:48 2008
New Revision: 14415

Modified:
   Prophet/trunk/   (props changed)
   Prophet/trunk/lib/Prophet/CLI.pm

Log:
 r64781 at onn:  sartak | 2008-07-22 23:54:17 -0400
 Avoid passing type => undef which causes a type error


Modified: Prophet/trunk/lib/Prophet/CLI.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI.pm	(original)
+++ Prophet/trunk/lib/Prophet/CLI.pm	Tue Jul 22 23:59:48 2008
@@ -139,6 +139,12 @@
         type     => $self->type,
     );
 
+    # undef causes type constraint violations
+    for my $key (keys %constructor_args) {
+        delete $constructor_args{$key}
+            if !defined($constructor_args{$key});
+    }
+
     $constructor_args{uuid} = $self->uuid
         if $self->has_uuid;
 



More information about the Bps-public-commit mailing list