From: Shawn M Moore Date: Sun, 25 May 2008 01:34:20 +0000 (+0000) Subject: Trait::Collection::Bag X-Git-Tag: 0.18_01~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cf4136b437c24f1961a431794900975532b3c836;hp=7bf3c9a71bd7b389b64522f90358099c93277800;p=gitmo%2FMooseX-AttributeHelpers.git Trait::Collection::Bag --- diff --git a/lib/MooseX/AttributeHelpers.pm b/lib/MooseX/AttributeHelpers.pm index b7d2605..4a73b89 100644 --- a/lib/MooseX/AttributeHelpers.pm +++ b/lib/MooseX/AttributeHelpers.pm @@ -13,6 +13,7 @@ use MooseX::AttributeHelpers::Trait::Collection::List; use MooseX::AttributeHelpers::Trait::Collection::Array; use MooseX::AttributeHelpers::Trait::Collection::Hash; use MooseX::AttributeHelpers::Trait::Collection::ImmutableHash; +use MooseX::AttributeHelpers::Trait::Collection::Bag; use MooseX::AttributeHelpers::Counter; use MooseX::AttributeHelpers::Number; diff --git a/lib/MooseX/AttributeHelpers/Collection/Bag.pm b/lib/MooseX/AttributeHelpers/Collection/Bag.pm index 48bb388..46e0931 100644 --- a/lib/MooseX/AttributeHelpers/Collection/Bag.pm +++ b/lib/MooseX/AttributeHelpers/Collection/Bag.pm @@ -14,7 +14,8 @@ has '+method_provider' => ( default => 'MooseX::AttributeHelpers::MethodProvider::Bag' ); -subtype 'Bag' => as 'HashRef[Int]'; +subtype 'Bag' => as 'HashRef[Int]' + unless find_type_constraint('Bag'); sub helper_type { 'Bag' } @@ -107,4 +108,4 @@ L This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. -=cut \ No newline at end of file +=cut