adding support for Deferred
[gitmo/MooseX-Storage.git] / lib / MooseX / Storage / Engine.pm
index f162031..a49cd07 100644 (file)
@@ -2,7 +2,7 @@
 package MooseX::Storage::Engine;
 use Moose;
 
-our $VERSION   = '0.02';
+our $VERSION   = '0.03';
 our $AUTHORITY = 'cpan:STEVAN';
 
 # the class marker when 
@@ -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 {
@@ -420,7 +422,7 @@ Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2007 by Infinity Interactive, Inc.
+Copyright 2007-2008 by Infinity Interactive, Inc.
 
 L<http://www.iinteractive.com>