package MooseX::AttributeHelpers::Collection::Bag;
use Moose;
-use Moose::Util::TypeConstraints;
-our $VERSION = '0.12_01';
+our $VERSION = '0.23';
$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
has 'word_histogram' => (
metaclass => 'Collection::Bag',
is => 'ro',
- isa => 'Bag', # optional ... as is defalt
+ isa => 'Bag', # optional ... as is default
provides => {
'add' => 'add_word',
'get' => 'get_count_for',
=head1 COPYRIGHT AND LICENSE
-Copyright 2007-2008 by Infinity Interactive, Inc.
+Copyright 2007-2009 by Infinity Interactive, Inc.
L<http://www.iinteractive.com>