X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FRole%2FComposite.pm;h=58496c369ffcba50b1ff9c0f4759c90827faa6b3;hp=2dc5086b4a39c45b38872b5ad986bb1a6c053968;hb=45f22b92d1140ad101f7c3112bc565890ea5a1ad;hpb=01e830f796a9ecdec0d977f2b88110363ebf013f diff --git a/lib/Mouse/Meta/Role/Composite.pm b/lib/Mouse/Meta/Role/Composite.pm index 2dc5086..58496c3 100644 --- a/lib/Mouse/Meta/Role/Composite.pm +++ b/lib/Mouse/Meta/Role/Composite.pm @@ -79,19 +79,19 @@ sub add_override_method_modifier{ # components of apply() sub _apply_methods{ - my($self, $applicant, $args) = @_; + my($self, $consumer, $args) = @_; if(exists $self->{conflicting_methods}){ - my $applicant_class_name = $applicant->name; + my $consumer_class_name = $consumer->name; - my @conflicting = sort grep{ !$applicant_class_name->can($_) } keys %{ $self->{conflicting_methods} }; + my @conflicting = sort grep{ !$consumer_class_name->can($_) } keys %{ $self->{conflicting_methods} }; if(@conflicting == 1){ my $method_name = $conflicting[0]; my @roles = sort @{ $self->{composed_roles_by_method}{$method_name} }; $self->throw_error( sprintf q{Due to a method name conflict in roles %s, the method '%s' must be implemented or excluded by '%s'}, - english_list(map{ sprintf q{'%s'}, $_->name } @roles), $method_name, $applicant->name + english_list(map{ sprintf q{'%s'}, $_->name } @roles), $method_name, $consumer->name ); } elsif(@conflicting > 1){ @@ -105,12 +105,12 @@ sub _apply_methods{ $self->throw_error( sprintf q{Due to method name conflicts in roles %s, the methods %s must be implemented or excluded by '%s'}, - $roles, $methods, $applicant->name + $roles, $methods, $consumer->name ); } } - $self->SUPER::_apply_methods($applicant, $args); + $self->SUPER::_apply_methods($consumer, $args); return; } 1;