Fix error message.
[gitmo/MooseX-AttributeHelpers.git] / lib / MooseX / AttributeHelpers / Trait / Base.pm
index 44bb4f9..fbdfd9b 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.21';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -82,8 +82,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 +160,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 +168,7 @@ after 'install_accessors' => sub {
                 package_name => $class_name,
                 name => $curried_name,
             );
-                
+
             $attr->associate_method($method);
             $class->add_method($curried_name => $method);
         }
@@ -227,3 +225,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