X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FAttributeHelpers%2FCollection%2FBag.pm;h=7a7b7e3f1f07a46bcc19a50d18b405e9bb164dfb;hb=c1984b5cba19ecded4359b572d572baf13d8fc1d;hp=a465fcfa9e85ac39dbdf9480af764f184b2ff95f;hpb=3f58c364a8760b02b72f5cb487e6c94ecdaaf363;p=gitmo%2FMooseX-AttributeHelpers.git diff --git a/lib/MooseX/AttributeHelpers/Collection/Bag.pm b/lib/MooseX/AttributeHelpers/Collection/Bag.pm index a465fcf..7a7b7e3 100644 --- a/lib/MooseX/AttributeHelpers/Collection/Bag.pm +++ b/lib/MooseX/AttributeHelpers/Collection/Bag.pm @@ -1,36 +1,15 @@ package MooseX::AttributeHelpers::Collection::Bag; use Moose; -use Moose::Util::TypeConstraints; -our $VERSION = '0.12'; +our $VERSION = '0.19'; +$VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; -use MooseX::AttributeHelpers::MethodProvider::Bag; - -extends 'MooseX::AttributeHelpers::Collection'; - -has '+method_provider' => ( - default => 'MooseX::AttributeHelpers::MethodProvider::Bag' -); - -subtype 'Bag' => as 'HashRef[Int]'; - -sub helper_type { 'Bag' } - -before 'process_options_for_provides' => sub { - my ($self, $options, $name) = @_; - - # Set some default attribute options here unless already defined - if ((my $type = $self->helper_type) && !exists $options->{isa}){ - $options->{isa} = $type; - } - - $options->{default} = sub { +{} } unless exists $options->{default}; -}; +extends 'Moose::Meta::Attribute'; +with 'MooseX::AttributeHelpers::Trait::Collection::Bag'; no Moose; -no Moose::Util::TypeConstraints; # register the alias ... package # hide me from search.cpan.org @@ -100,7 +79,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2007-2008 by Infinity Interactive, Inc. +Copyright 2007-2009 by Infinity Interactive, Inc. L