From: Shawn M Moore Date: Sun, 25 May 2008 01:21:57 +0000 (+0000) Subject: MooseX::AttributeHelpers::Trait::Collection::List X-Git-Tag: 0.18_01~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=16f40f07ea536c9b94de7e9f47412a6400b121c3;p=gitmo%2FMooseX-AttributeHelpers.git MooseX::AttributeHelpers::Trait::Collection::List --- diff --git a/lib/MooseX/AttributeHelpers.pm b/lib/MooseX/AttributeHelpers.pm index 96f48df..f41ea90 100644 --- a/lib/MooseX/AttributeHelpers.pm +++ b/lib/MooseX/AttributeHelpers.pm @@ -9,6 +9,7 @@ use MooseX::AttributeHelpers::Meta::Method::Provided; use MooseX::AttributeHelpers::Trait::Counter; use MooseX::AttributeHelpers::Trait::Number; use MooseX::AttributeHelpers::Trait::String; +use MooseX::AttributeHelpers::Trait::Collection::List; use MooseX::AttributeHelpers::Counter; use MooseX::AttributeHelpers::Number; diff --git a/lib/MooseX/AttributeHelpers/Trait/Collection/List.pm b/lib/MooseX/AttributeHelpers/Trait/Collection/List.pm index 072fb25..a62bf5d 100644 --- a/lib/MooseX/AttributeHelpers/Trait/Collection/List.pm +++ b/lib/MooseX/AttributeHelpers/Trait/Collection/List.pm @@ -9,18 +9,23 @@ use MooseX::AttributeHelpers::MethodProvider::List; with 'MooseX::AttributeHelpers::Trait::Collection'; -has '+method_provider' => ( - default => 'MooseX::AttributeHelpers::MethodProvider::List' +has 'method_provider' => ( + is => 'ro', + isa => 'ClassName', + predicate => 'has_method_provider', + default => 'MooseX::AttributeHelpers::MethodProvider::List' ); sub helper_type { 'ArrayRef' } -no Moose; +no Moose::Role; # register the alias ... package # hide me from search.cpan.org - Moose::Meta::Attribute::Custom::Collection::List; -sub register_implementation { 'MooseX::AttributeHelpers::Collection::List' } + Moose::Meta::Attribute::Custom::Trait::Collection::List; +sub register_implementation { + 'MooseX::AttributeHelpers::Trait::Collection::List' +} 1;