bump version to 0.23
[gitmo/MooseX-AttributeHelpers.git] / lib / MooseX / AttributeHelpers / Trait / Base.pm
index 44bb4f9..42b9269 100644 (file)
@@ -3,7 +3,7 @@ package MooseX::AttributeHelpers::Trait::Base;
 use Moose::Role;
 use Moose::Util::TypeConstraints;
 
-our $VERSION   = '0.17';
+our $VERSION   = '0.23';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -45,16 +45,12 @@ has 'method_constructors' => (
         return +{
             map {
                 $_ => $method_provider->get_method($_)
-            } $method_provider->get_method_list
+            }
+            grep { $_ ne 'meta' } $method_provider->get_method_list
         };
     },
 );
 
-# extend the parents stuff to make sure
-# certain bits are now required ...
-has '+default'         => (required => 1);
-has '+type_constraint' => (required => 1);
-
 ## Methods called prior to instantiation
 
 sub process_options_for_provides {
@@ -82,8 +78,6 @@ before '_process_options' => sub {
 
 ## methods called after instantiation
 
-# this confirms that provides (and curries) has
-# all valid possibilities in it
 sub check_provides_values {
     my $self = shift;
 
@@ -162,7 +156,7 @@ after 'install_accessors' => sub {
                 $method_code = $attr->_curry_sub($body, $curried_arg);
             }
             else {
-                confess "curries parameter must be ref type HASH or CODE";
+                confess "curries parameter must be ref type ARRAY or CODE";
             }
 
             my $method = MooseX::AttributeHelpers::Meta::Method::Curried->wrap(
@@ -170,7 +164,7 @@ after 'install_accessors' => sub {
                 package_name => $class_name,
                 name => $curried_name,
             );
-                
+
             $attr->associate_method($method);
             $class->add_method($curried_name => $method);
         }
@@ -227,3 +221,43 @@ no Moose::Util::TypeConstraints;
 
 1;
 
+__END__
+
+=head1 NAME
+
+MooseX::AttributeHelpers::Trait::Base - base role for helpers
+
+=head1 METHODS
+
+=head2 check_provides_values
+
+Confirms that provides (and curries) has all valid possibilities in it.
+
+=head2 process_options_for_provides
+
+Ensures that the type constraint (C<isa>) matches the helper type.
+
+=head1 BUGS
+
+All complex software has bugs lurking in it, and this module is no 
+exception. If you find a bug please either email me, or add the bug
+to cpan-RT.
+
+=head1 AUTHORS
+
+Yuval Kogman
+
+Shawn M Moore
+
+Jesse Luehrs
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2007-2009 by Infinity Interactive, Inc.
+
+L<http://www.iinteractive.com>
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut