X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FStorage%2FEngine.pm;h=f120668bce2135b3d511eb9aa5f87c4386b620ad;hb=36a0b64218716471431e00a69b31046e62f0f6ae;hp=cee4178ef3d2aadaf96880cf8f164c008bfbd87a;hpb=1f5c6dd8f93eeac19200d0b3ad36d33e5065f53b;p=gitmo%2FMooseX-Storage.git diff --git a/lib/MooseX/Storage/Engine.pm b/lib/MooseX/Storage/Engine.pm index cee4178..f120668 100644 --- a/lib/MooseX/Storage/Engine.pm +++ b/lib/MooseX/Storage/Engine.pm @@ -3,7 +3,7 @@ package MooseX::Storage::Engine; use Moose; use Scalar::Util qw(refaddr); -our $VERSION = '0.25'; +our $VERSION = '0.30'; our $AUTHORITY = 'cpan:STEVAN'; # the class marker when @@ -22,7 +22,7 @@ has 'seen' => ( default => sub {{}} ); -has 'object' => (is => 'rw', isa => 'Object'); +has 'object' => (is => 'rw', isa => 'Object', predicate => '_has_object'); has 'class' => (is => 'rw', isa => 'Str'); ## this is the API used by other modules ... @@ -143,7 +143,7 @@ sub map_attributes { } grep { # Skip our special skip attribute :) !$_->does('MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize') - } ($self->object || $self->class)->meta->get_all_attributes; + } ($self->_has_object ? $self->object : $self->class)->meta->get_all_attributes; } ## ------------------------------------------------------------------