From: Shawn M Moore Date: Sat, 4 Aug 2007 19:09:20 +0000 (+0000) Subject: Make false ints and strings work, bools still no good X-Git-Tag: 0_07~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=14b0a4dc41210994035d9fdf26c7616340b47ab4;p=gitmo%2FMooseX-Storage.git Make false ints and strings work, bools still no good --- diff --git a/lib/MooseX/Storage/Engine.pm b/lib/MooseX/Storage/Engine.pm index 07aeae2..f162031 100644 --- a/lib/MooseX/Storage/Engine.pm +++ b/lib/MooseX/Storage/Engine.pm @@ -61,7 +61,8 @@ sub collapse_attribute { sub expand_attribute { my ($self, $attr, $data, $options) = @_; - $self->storage->{$attr->name} = $self->expand_attribute_value($attr, $data->{$attr->name}, $options) || return; + my $value = $self->expand_attribute_value($attr, $data->{$attr->name}, $options); + $self->storage->{$attr->name} = defined $value ? $value : return; } sub collapse_attribute_value {