From: Shawn M Moore Date: Thu, 25 Jun 2009 18:51:43 +0000 (-0400) Subject: Remove register_implementation, warn about future deprecation X-Git-Tag: 0.20~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c1984b5cba19ecded4359b572d572baf13d8fc1d;p=gitmo%2FMooseX-AttributeHelpers.git Remove register_implementation, warn about future deprecation --- diff --git a/ChangeLog b/ChangeLog index 3d69908..dd39aaf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,14 @@ Revision history for Perl extension MooseX-AttributeHelpers +0.20 Thu June 25, 2009 + - MXAH is moving into core. This module will be deprecated when + that finally happens. + - Remove register_implementation methods from the traits because + we don't want to conflict with cored AttributeHelpers. You'll need to + specify the full package name for traits -- + MooseX::AttributeHelpers::Trait::Counter instead of Counter - New provided method for hashs: elements (Returns the key, value - pairs in the hash as a flattened list) + pairs in the hash as a flattened list) (plu) 0.19 Sun June 14, 2009 - No functional changes from 0.18_01 diff --git a/lib/MooseX/AttributeHelpers/Trait/Bool.pm b/lib/MooseX/AttributeHelpers/Trait/Bool.pm index 7c04b59..2914f45 100644 --- a/lib/MooseX/AttributeHelpers/Trait/Bool.pm +++ b/lib/MooseX/AttributeHelpers/Trait/Bool.pm @@ -34,11 +34,6 @@ before 'process_options_for_provides' => sub { no Moose::Role; -# register the alias ... -package # hide me from search.cpan.org - Moose::Meta::Attribute::Custom::Trait::Bool; -sub register_implementation { 'MooseX::AttributeHelpers::Trait::Bool' } - 1; =pod diff --git a/lib/MooseX/AttributeHelpers/Trait/Collection/Array.pm b/lib/MooseX/AttributeHelpers/Trait/Collection/Array.pm index aa31c3e..cc7b070 100644 --- a/lib/MooseX/AttributeHelpers/Trait/Collection/Array.pm +++ b/lib/MooseX/AttributeHelpers/Trait/Collection/Array.pm @@ -21,14 +21,6 @@ sub helper_type { 'ArrayRef' } no Moose::Role; -# register the alias ... -package # hide me from search.cpan.org - Moose::Meta::Attribute::Custom::Trait::Collection::Array; -sub register_implementation { - 'MooseX::AttributeHelpers::Trait::Collection::Array' -} - - 1; __END__ diff --git a/lib/MooseX/AttributeHelpers/Trait/Collection/Bag.pm b/lib/MooseX/AttributeHelpers/Trait/Collection/Bag.pm index 43c12c8..56d47d3 100644 --- a/lib/MooseX/AttributeHelpers/Trait/Collection/Bag.pm +++ b/lib/MooseX/AttributeHelpers/Trait/Collection/Bag.pm @@ -36,13 +36,6 @@ before 'process_options_for_provides' => sub { no Moose::Role; no Moose::Util::TypeConstraints; -# register the alias ... -package # hide me from search.cpan.org - Moose::Meta::Attribute::Custom::Trait::Collection::Bag; -sub register_implementation { - 'MooseX::AttributeHelpers::Trait::Collection::Bag' -} - 1; __END__ diff --git a/lib/MooseX/AttributeHelpers/Trait/Collection/Hash.pm b/lib/MooseX/AttributeHelpers/Trait/Collection/Hash.pm index c0867c4..34025ed 100644 --- a/lib/MooseX/AttributeHelpers/Trait/Collection/Hash.pm +++ b/lib/MooseX/AttributeHelpers/Trait/Collection/Hash.pm @@ -21,14 +21,6 @@ sub helper_type { 'HashRef' } no Moose::Role; -# register the alias ... -package # hide me from search.cpan.org - Moose::Meta::Attribute::Custom::Trait::Collection::Hash; -sub register_implementation { - 'MooseX::AttributeHelpers::Trait::Collection::Hash' -} - - 1; __END__ diff --git a/lib/MooseX/AttributeHelpers/Trait/Collection/ImmutableHash.pm b/lib/MooseX/AttributeHelpers/Trait/Collection/ImmutableHash.pm index 62c749d..3faca6d 100644 --- a/lib/MooseX/AttributeHelpers/Trait/Collection/ImmutableHash.pm +++ b/lib/MooseX/AttributeHelpers/Trait/Collection/ImmutableHash.pm @@ -21,14 +21,6 @@ sub helper_type { 'HashRef' } no Moose::Role; -# register the alias ... -package # hide me from search.cpan.org - Moose::Meta::Attribute::Custom::Trait::Collection::ImmutableHash; -sub register_implementation { - 'MooseX::AttributeHelpers::Trait::Collection::ImmutableHash' -} - - 1; __END__ diff --git a/lib/MooseX/AttributeHelpers/Trait/Collection/List.pm b/lib/MooseX/AttributeHelpers/Trait/Collection/List.pm index 97c6e3d..bd8bf63 100644 --- a/lib/MooseX/AttributeHelpers/Trait/Collection/List.pm +++ b/lib/MooseX/AttributeHelpers/Trait/Collection/List.pm @@ -21,14 +21,6 @@ sub helper_type { 'ArrayRef' } no Moose::Role; -# register the alias ... -package # hide me from search.cpan.org - Moose::Meta::Attribute::Custom::Trait::Collection::List; -sub register_implementation { - 'MooseX::AttributeHelpers::Trait::Collection::List' -} - - 1; __END__ diff --git a/lib/MooseX/AttributeHelpers/Trait/Counter.pm b/lib/MooseX/AttributeHelpers/Trait/Counter.pm index ca75449..36a69a8 100644 --- a/lib/MooseX/AttributeHelpers/Trait/Counter.pm +++ b/lib/MooseX/AttributeHelpers/Trait/Counter.pm @@ -47,11 +47,6 @@ after 'check_provides_values' => sub { no Moose::Role; -# register the alias ... -package # hide me from search.cpan.org - Moose::Meta::Attribute::Custom::Trait::Counter; -sub register_implementation { 'MooseX::AttributeHelpers::Trait::Counter' } - 1; __END__ diff --git a/lib/MooseX/AttributeHelpers/Trait/Number.pm b/lib/MooseX/AttributeHelpers/Trait/Number.pm index 2a7fc4a..cab6640 100644 --- a/lib/MooseX/AttributeHelpers/Trait/Number.pm +++ b/lib/MooseX/AttributeHelpers/Trait/Number.pm @@ -55,11 +55,6 @@ has 'method_constructors' => ( no Moose::Role; -# register the alias ... -package # hide me from search.cpan.org - Moose::Meta::Attribute::Custom::Trait::Number; -sub register_implementation { 'MooseX::AttributeHelpers::Trait::Number' } - 1; =pod diff --git a/lib/MooseX/AttributeHelpers/Trait/String.pm b/lib/MooseX/AttributeHelpers/Trait/String.pm index 9f49641..39111ab 100644 --- a/lib/MooseX/AttributeHelpers/Trait/String.pm +++ b/lib/MooseX/AttributeHelpers/Trait/String.pm @@ -47,11 +47,6 @@ after 'check_provides_values' => sub { no Moose::Role; -# register the alias ... -package # hide me from search.cpan.org - Moose::Meta::Attribute::Custom::Trait::String; -sub register_implementation { 'MooseX::AttributeHelpers::Trait::String' } - 1; __END__ diff --git a/t/201_trait_counter.t b/t/201_trait_counter.t index c91ae92..41875fd 100644 --- a/t/201_trait_counter.t +++ b/t/201_trait_counter.t @@ -15,7 +15,7 @@ BEGIN { use Moose; has 'counter' => ( - traits => [qw/Counter/], + traits => [qw/MooseX::AttributeHelpers::Trait::Counter/], is => 'ro', isa => 'Int', default => sub { 0 }, diff --git a/t/202_trait_array.t b/t/202_trait_array.t index e7cffc6..5fe04a6 100644 --- a/t/202_trait_array.t +++ b/t/202_trait_array.t @@ -16,7 +16,7 @@ BEGIN { use Moose; has 'options' => ( - traits => [qw/Collection::Array/], + traits => [qw/MooseX::AttributeHelpers::Trait::Collection::Array/], is => 'ro', isa => 'ArrayRef[Int]', default => sub { [] }, diff --git a/t/203_trait_hash.t b/t/203_trait_hash.t index 4f016e5..509b2a6 100644 --- a/t/203_trait_hash.t +++ b/t/203_trait_hash.t @@ -17,7 +17,7 @@ BEGIN { use MooseX::AttributeHelpers; has 'options' => ( - traits => [qw/Collection::Hash/], + traits => [qw/MooseX::AttributeHelpers::Trait::Collection::Hash/], is => 'ro', isa => 'HashRef[Str]', default => sub { {} }, diff --git a/t/204_trait_number.t b/t/204_trait_number.t index 2ae6105..bb1bead 100644 --- a/t/204_trait_number.t +++ b/t/204_trait_number.t @@ -15,7 +15,7 @@ BEGIN { use Moose; has 'integer' => ( - traits => [qw/Number/], + traits => [qw/MooseX::AttributeHelpers::Trait::Number/], is => 'ro', isa => 'Int', default => sub { 5 }, diff --git a/t/205_trait_list.t b/t/205_trait_list.t index cd622d8..ec0647c 100644 --- a/t/205_trait_list.t +++ b/t/205_trait_list.t @@ -16,7 +16,7 @@ BEGIN { use Moose; has '_options' => ( - traits => [qw/Collection::List/], + traits => [qw/MooseX::AttributeHelpers::Trait::Collection::List/], is => 'ro', isa => 'ArrayRef[Int]', init_arg => 'options', diff --git a/t/206_trait_bag.t b/t/206_trait_bag.t index 105bb78..44f76ac 100644 --- a/t/206_trait_bag.t +++ b/t/206_trait_bag.t @@ -17,7 +17,7 @@ BEGIN { use MooseX::AttributeHelpers; has 'word_histogram' => ( - traits => [qw/Collection::Bag/], + traits => [qw/MooseX::AttributeHelpers::Trait::Collection::Bag/], is => 'ro', provides => { 'add' => 'add_word', diff --git a/t/207_trait_string.t b/t/207_trait_string.t index 0383870..5096cec 100644 --- a/t/207_trait_string.t +++ b/t/207_trait_string.t @@ -15,7 +15,7 @@ BEGIN { use Moose; has 'string' => ( - traits => [qw/String/], + traits => [qw/MooseX::AttributeHelpers::Trait::String/], is => 'rw', isa => 'Str', default => sub { '' }, diff --git a/t/208_trait_bool.t b/t/208_trait_bool.t index 4c0e36d..6f4c159 100644 --- a/t/208_trait_bool.t +++ b/t/208_trait_bool.t @@ -10,7 +10,7 @@ use MooseX::AttributeHelpers; package Room; use Moose; has 'is_lit' => ( - traits => ['Bool'], + traits => ['MooseX::AttributeHelpers::Trait::Bool'], is => 'rw', isa => 'Bool', default => sub { 0 },