From: Shawn M Moore Date: Tue, 7 Aug 2007 05:08:08 +0000 (+0000) Subject: Fix that failing test, caused by $self->collapse_attribute_value() || return X-Git-Tag: 0_07~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eea0dfae5583a43b8e107b779f2edda610717bac;p=gitmo%2FMooseX-Storage.git Fix that failing test, caused by $self->collapse_attribute_value() || return --- diff --git a/lib/MooseX/Storage/Engine.pm b/lib/MooseX/Storage/Engine.pm index f162031..9b39d15 100644 --- a/lib/MooseX/Storage/Engine.pm +++ b/lib/MooseX/Storage/Engine.pm @@ -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 {