X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FRole%2FMethod.pm;h=4c2959b1b3818ab03a6f1cdccf87c8011e31778e;hp=9ac67a45d75e74ac9e9a2fa2e837a609f9868f69;hb=bd76a699d654075009bb9fd707021721eecf8299;hpb=b06ce1f502945c13a52c503f1a651fe92c91c773 diff --git a/lib/Mouse/Meta/Role/Method.pm b/lib/Mouse/Meta/Role/Method.pm index 9ac67a4..4c2959b 100755 --- a/lib/Mouse/Meta/Role/Method.pm +++ b/lib/Mouse/Meta/Role/Method.pm @@ -4,11 +4,14 @@ use Mouse::Util; # enables strict and warnings use Mouse::Meta::Method; our @ISA = qw(Mouse::Meta::Method); -sub _new { - my $class = shift; - return $class->meta->new_object(@_) - if $class ne __PACKAGE__; - return bless {@_}, $class; +sub _new{ + my($class, %args) = @_; + my $self = bless \%args, $class; + + if($class ne __PACKAGE__){ + $self->meta->_initialize_object($self, \%args); + } + return $self; } 1; @@ -20,7 +23,7 @@ Mouse::Meta::Role::Method - A Mouse Method metaclass for Roles =head1 VERSION -This document describes Mouse version 0.40_01 +This document describes Mouse version 0.47 =head1 SEE ALSO