X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FAttribute%2FNative%2FTrait.pm;h=e3a31a8bb6a7fe5e7b0157c55e024e2014448339;hb=72643035d73124e0b4ef7a8335cdc4f793732b5a;hp=5058ba72b8c60d27792718232d0290b96df26634;hpb=122a129ac1b02a53a4ac31f848a9bc89ce8feacf;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Attribute/Native/Trait.pm b/lib/Moose/Meta/Attribute/Native/Trait.pm index 5058ba7..e3a31a8 100644 --- a/lib/Moose/Meta/Attribute/Native/Trait.pm +++ b/lib/Moose/Meta/Attribute/Native/Trait.pm @@ -3,7 +3,7 @@ package Moose::Meta::Attribute::Native::Trait; use Moose::Role; use Moose::Util::TypeConstraints; -our $VERSION = '0.89'; +our $VERSION = '1.08'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; @@ -34,9 +34,6 @@ has 'method_constructors' => ( }, ); -has '+default' => ( required => 1 ); -has '+type_constraint' => ( required => 1 ); - # methods called prior to instantiation before '_process_options' => sub { @@ -109,9 +106,7 @@ around '_make_delegation_method' => sub { my $next = shift; my ( $self, $handle_name, $method_to_call ) = @_; - my ( $name, $curried_args ) = @$method_to_call; - - $curried_args ||= []; + my ( $name, @curried_args ) = @$method_to_call; my $method_constructors = $self->method_constructors; @@ -126,7 +121,7 @@ around '_make_delegation_method' => sub { $handle_name, sub { my $instance = shift; - return $code->( $instance, @$curried_args, @_ ); + return $code->( $instance, @curried_args, @_ ); }, ); }; @@ -140,13 +135,15 @@ __END__ =head1 NAME -Moose::Meta::Attribute::Native::Trait - base role for helpers +Moose::Meta::Attribute::Native::Trait - Base role for helpers =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. +See L for details on reporting bugs. + +=head1 SEE ALSO + +Documentation for Moose native traits starts at L =head1 AUTHORS