From: Tomas Doran Date: Mon, 6 Apr 2009 14:24:12 +0000 (+0000) Subject: Update the use non-deprecated methods, and bump all the version numbers to be current. X-Git-Tag: 0.17~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f4ffa4ef5e4cb4a1a43caf932db1b3478abe7b87;p=gitmo%2FMooseX-Storage.git Update the use non-deprecated methods, and bump all the version numbers to be current. --- diff --git a/Changes b/Changes index 4ef661b..d692938 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for MooseX-Storage +0.17 + * Change MooseX::Storage::Engine to use get_all_attributes, + rather than the deprecated compute_all_applicable_attributes (t0m) + 0.16 * Don't fail tests when Best is unavailable (t0m) diff --git a/lib/MooseX/Storage.pm b/lib/MooseX/Storage.pm index 810b764..1785fe8 100644 --- a/lib/MooseX/Storage.pm +++ b/lib/MooseX/Storage.pm @@ -4,7 +4,7 @@ use Moose qw(confess); use MooseX::Storage::Meta::Attribute::DoNotSerialize; -our $VERSION = '0.15'; +our $VERSION = '0.17'; our $AUTHORITY = 'cpan:STEVAN'; sub import { diff --git a/lib/MooseX/Storage/Base/WithChecksum.pm b/lib/MooseX/Storage/Base/WithChecksum.pm index 795f7cd..5bb2026 100644 --- a/lib/MooseX/Storage/Base/WithChecksum.pm +++ b/lib/MooseX/Storage/Base/WithChecksum.pm @@ -7,7 +7,7 @@ use Data::Dumper (); use MooseX::Storage::Engine; -our $VERSION = '0.02'; +our $VERSION = '0.17'; our $AUTHORITY = 'cpan:STEVAN'; our $DIGEST_MARKER = '__DIGEST__'; diff --git a/lib/MooseX/Storage/Basic.pm b/lib/MooseX/Storage/Basic.pm index d43d26a..7e4d2f7 100644 --- a/lib/MooseX/Storage/Basic.pm +++ b/lib/MooseX/Storage/Basic.pm @@ -4,7 +4,7 @@ use Moose::Role; use MooseX::Storage::Engine; -our $VERSION = '0.01'; +our $VERSION = '0.17'; our $AUTHORITY = 'cpan:STEVAN'; sub pack { diff --git a/lib/MooseX/Storage/Deferred.pm b/lib/MooseX/Storage/Deferred.pm index 2326daf..c402760 100644 --- a/lib/MooseX/Storage/Deferred.pm +++ b/lib/MooseX/Storage/Deferred.pm @@ -1,7 +1,7 @@ package MooseX::Storage::Deferred; use Moose::Role; -our $VERSION = '0.03'; +our $VERSION = '0.17'; our $AUTHORITY = 'cpan:STEVAN'; with 'MooseX::Storage::Basic'; 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; } ## ------------------------------------------------------------------ diff --git a/lib/MooseX/Storage/Engine/IO/AtomicFile.pm b/lib/MooseX/Storage/Engine/IO/AtomicFile.pm index ad453c4..b3c9850 100644 --- a/lib/MooseX/Storage/Engine/IO/AtomicFile.pm +++ b/lib/MooseX/Storage/Engine/IO/AtomicFile.pm @@ -5,7 +5,7 @@ use Moose; use utf8 (); use IO::AtomicFile; -our $VERSION = '0.03'; +our $VERSION = '0.17'; our $AUTHORITY = 'cpan:STEVAN'; extends 'MooseX::Storage::Engine::IO::File'; diff --git a/lib/MooseX/Storage/Engine/IO/File.pm b/lib/MooseX/Storage/Engine/IO/File.pm index f8b63f1..20e6f36 100644 --- a/lib/MooseX/Storage/Engine/IO/File.pm +++ b/lib/MooseX/Storage/Engine/IO/File.pm @@ -5,7 +5,7 @@ use Moose; use utf8 (); use IO::File; -our $VERSION = '0.03'; +our $VERSION = '0.17'; our $AUTHORITY = 'cpan:STEVAN'; has 'file' => ( diff --git a/lib/MooseX/Storage/Format/JSON.pm b/lib/MooseX/Storage/Format/JSON.pm index edde12a..0cebba1 100644 --- a/lib/MooseX/Storage/Format/JSON.pm +++ b/lib/MooseX/Storage/Format/JSON.pm @@ -7,7 +7,7 @@ no warnings 'once'; use JSON::Any; use utf8 (); -our $VERSION = '0.03'; +our $VERSION = '0.17'; our $AUTHORITY = 'cpan:STEVAN'; requires 'pack'; diff --git a/lib/MooseX/Storage/Format/Storable.pm b/lib/MooseX/Storage/Format/Storable.pm index 453f23d..1215424 100644 --- a/lib/MooseX/Storage/Format/Storable.pm +++ b/lib/MooseX/Storage/Format/Storable.pm @@ -4,7 +4,7 @@ use Moose::Role; use Storable (); -our $VERSION = '0.01'; +our $VERSION = '0.17'; our $AUTHORITY = 'cpan:STEVAN'; requires 'pack'; diff --git a/lib/MooseX/Storage/Format/YAML.pm b/lib/MooseX/Storage/Format/YAML.pm index 91d9749..be111a7 100644 --- a/lib/MooseX/Storage/Format/YAML.pm +++ b/lib/MooseX/Storage/Format/YAML.pm @@ -11,7 +11,7 @@ use Best [ [ qw[Load Dump] ] ]; -our $VERSION = '0.02'; +our $VERSION = '0.17'; our $AUTHORITY = 'cpan:STEVAN'; requires 'pack'; diff --git a/lib/MooseX/Storage/IO/AtomicFile.pm b/lib/MooseX/Storage/IO/AtomicFile.pm index 07e558b..e1c4b0d 100644 --- a/lib/MooseX/Storage/IO/AtomicFile.pm +++ b/lib/MooseX/Storage/IO/AtomicFile.pm @@ -4,7 +4,7 @@ use Moose::Role; use MooseX::Storage::Engine::IO::AtomicFile; -our $VERSION = '0.01'; +our $VERSION = '0.17'; our $AUTHORITY = 'cpan:STEVAN'; with 'MooseX::Storage::IO::File'; diff --git a/lib/MooseX/Storage/IO/File.pm b/lib/MooseX/Storage/IO/File.pm index 4cb0e00..e31b12d 100644 --- a/lib/MooseX/Storage/IO/File.pm +++ b/lib/MooseX/Storage/IO/File.pm @@ -4,7 +4,7 @@ use Moose::Role; use MooseX::Storage::Engine::IO::File; -our $VERSION = '0.01'; +our $VERSION = '0.17'; our $AUTHORITY = 'cpan:STEVAN'; requires 'thaw'; diff --git a/lib/MooseX/Storage/IO/StorableFile.pm b/lib/MooseX/Storage/IO/StorableFile.pm index ab32bf2..f53bd44 100644 --- a/lib/MooseX/Storage/IO/StorableFile.pm +++ b/lib/MooseX/Storage/IO/StorableFile.pm @@ -4,7 +4,7 @@ use Moose::Role; use Storable (); -our $VERSION = '0.01'; +our $VERSION = '0.17'; our $AUTHORITY = 'cpan:STEVAN'; requires 'pack'; diff --git a/lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm b/lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm index 2981cc3..c33eb6c 100644 --- a/lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm +++ b/lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm @@ -2,7 +2,7 @@ package MooseX::Storage::Meta::Attribute::DoNotSerialize; use Moose; -our $VERSION = '0.02'; +our $VERSION = '0.17'; our $AUTHORITY = 'cpan:STEVAN'; extends 'Moose::Meta::Attribute'; @@ -11,7 +11,7 @@ extends 'Moose::Meta::Attribute'; # register this alias ... package Moose::Meta::Attribute::Custom::DoNotSerialize; -our $VERSION = '0.02'; +our $VERSION = '0.17'; our $AUTHORITY = 'cpan:STEVAN'; sub register_implementation { 'MooseX::Storage::Meta::Attribute::DoNotSerialize' } diff --git a/lib/MooseX/Storage/Meta/Attribute/Trait/DoNotSerialize.pm b/lib/MooseX/Storage/Meta/Attribute/Trait/DoNotSerialize.pm index f16ab79..388cf08 100644 --- a/lib/MooseX/Storage/Meta/Attribute/Trait/DoNotSerialize.pm +++ b/lib/MooseX/Storage/Meta/Attribute/Trait/DoNotSerialize.pm @@ -2,13 +2,13 @@ package MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize; use Moose::Role; -our $VERSION = '0.01'; +our $VERSION = '0.17'; our $AUTHORITY = 'cpan:STEVAN'; # register this alias ... package Moose::Meta::Attribute::Custom::Trait::DoNotSerialize; -our $VERSION = '0.01'; +our $VERSION = '0.17'; our $AUTHORITY = 'cpan:STEVAN'; sub register_implementation { 'MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize' } diff --git a/lib/MooseX/Storage/Util.pm b/lib/MooseX/Storage/Util.pm index 0096b0b..6bdd02e 100644 --- a/lib/MooseX/Storage/Util.pm +++ b/lib/MooseX/Storage/Util.pm @@ -4,7 +4,7 @@ use Moose qw(confess blessed); use MooseX::Storage::Engine (); use utf8 (); -our $VERSION = '0.03'; +our $VERSION = '0.17'; our $AUTHORITY = 'cpan:STEVAN'; sub peek {