X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FStorage%2FEngine.pm;fp=lib%2FMooseX%2FStorage%2FEngine.pm;h=72e4434e9c50a14a2144189ba4e4dfb5f819bb8c;hb=f4ffa4ef5e4cb4a1a43caf932db1b3478abe7b87;hp=5f99e4f68269d2c6a23b1cdf0a85ba890a77f44c;hpb=38c636f9fb20e5d22112f7c3842aa9b5661d4403;p=gitmo%2FMooseX-Storage.git diff --git a/lib/MooseX/Storage/Engine.pm b/lib/MooseX/Storage/Engine.pm index 5f99e4f..72e4434 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.07'; +our $VERSION = '0.17'; our $AUTHORITY = 'cpan:STEVAN'; # the class marker when @@ -70,15 +70,17 @@ sub expand_attribute { sub collapse_attribute_value { my ($self, $attr, $options) = @_; + # Faster, but breaks attributes without readers, do we care? + #my $value = $attr->get_read_method_ref->($self->object); my $value = $attr->get_value($self->object); - + # NOTE: - # this might not be enough, we might - # need to make it possible for the + # this might not be enough, we might + # need to make it possible for the # cycle checker to return the value $self->check_for_cycle_in_collapse($attr, $value) if ref $value; - + if (defined $value && $attr->has_type_constraint) { my $type_converter = $self->find_type_handler($attr->type_constraint); (defined $type_converter) @@ -137,7 +139,7 @@ sub map_attributes { } grep { # Skip our special skip attribute :) !$_->does('MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize') - } ($self->object || $self->class)->meta->compute_all_applicable_attributes; + } ($self->object || $self->class)->meta->get_all_attributes; } ## ------------------------------------------------------------------