Make false ints and strings work, bools still no good
Shawn M Moore [Sat, 4 Aug 2007 19:09:20 +0000 (19:09 +0000)]
lib/MooseX/Storage/Engine.pm

index 07aeae2..f162031 100644 (file)
@@ -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 {