X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoo%2FRole.pm;fp=lib%2FMoo%2FRole.pm;h=0f93a7839812c0d556d6e8b84a5168c576cd82da;hb=8dee08c10f9b63372dff89d38b37b175cdda4489;hp=0abae741f95126f08d8f3cac424af2b372fd58e1;hpb=e95d3981f31c078147fa6e3f5b61ff16683703ac;p=gitmo%2FMoo.git diff --git a/lib/Moo/Role.pm b/lib/Moo/Role.pm index 0abae74..0f93a78 100644 --- a/lib/Moo/Role.pm +++ b/lib/Moo/Role.pm @@ -256,7 +256,7 @@ sub create_class_with_roles { $Moo::MAKERS{$new_name} = {}; $me->_handle_constructor( - $new_name, [ map @{$INFO{$_}{attributes}||[]}, @roles ], $superclass + $new_name, [ map @{$INFO{$_}{attributes}||[]}, @roles ] ); return $new_name; @@ -276,14 +276,14 @@ sub _install_single_modifier { } sub _handle_constructor { - my ($me, $to, $attr_info, $superclass) = @_; + my ($me, $to, $attr_info) = @_; return unless $attr_info && @$attr_info; if ($INFO{$to}) { push @{$INFO{$to}{attributes}||=[]}, @$attr_info; } else { # only fiddle with the constructor if the target is a Moo class if ($INC{"Moo.pm"} - and my $con = Moo->_constructor_maker_for($to, $superclass)) { + and my $con = Moo->_constructor_maker_for($to)) { # shallow copy of the specs since the constructor will assign an index $con->register_attribute_specs(map ref() ? { %$_ } : $_, @$attr_info); }