Fix that failing test, caused by $self->collapse_attribute_value() || return
Shawn M Moore [Tue, 7 Aug 2007 05:08:08 +0000 (05:08 +0000)]
lib/MooseX/Storage/Engine.pm

index f162031..9b39d15 100644 (file)
@@ -56,7 +56,9 @@ sub expand_object {
 
 sub collapse_attribute {
     my ($self, $attr, $options)  = @_;
-    $self->storage->{$attr->name} = $self->collapse_attribute_value($attr, $options) || return;
+    my $value = $self->collapse_attribute_value($attr, $options);
+    return if !defined($value);
+    $self->storage->{$attr->name} = $value;
 }
 
 sub expand_attribute {