bump version to 0.23
[gitmo/MooseX-AttributeHelpers.git] / lib / MooseX / AttributeHelpers / Collection / Bag.pm
index a465fcf..26670f5 100644 (file)
@@ -1,36 +1,15 @@
 
 package MooseX::AttributeHelpers::Collection::Bag;
 use Moose;
-use Moose::Util::TypeConstraints;
 
-our $VERSION   = '0.12';
+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
@@ -56,7 +35,7 @@ MooseX::AttributeHelpers::Collection::Bag
   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',            
@@ -100,7 +79,7 @@ Stevan Little E<lt>stevan@iinteractive.comE<gt>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2007-2008 by Infinity Interactive, Inc.
+Copyright 2007-2009 by Infinity Interactive, Inc.
 
 L<http://www.iinteractive.com>