Moose::Meta::Role
Moose::Meta::Role::Method
Moose::Meta::Role::Method::Required
- Moose::Meta::Role::Method::Conflicted
+ Moose::Meta::Role::Method::Conflicting
Moose::Meta::Role::Composite
use Moose::Meta::Class;
use Moose::Meta::Role::Method;
use Moose::Meta::Role::Method::Required;
-use Moose::Meta::Role::Method::Conflicted;
+use Moose::Meta::Role::Method::Conflicting;
use base 'Class::MOP::Module';
);
$META->add_attribute(
- 'conflicted_method_metaclass',
- reader => 'conflicted_method_metaclass',
- default => 'Moose::Meta::Role::Method::Conflicted',
+ 'conflicting_method_metaclass',
+ reader => 'conflicting_method_metaclass',
+ default => 'Moose::Meta::Role::Method::Conflicting',
);
## some things don't always fit, so they go here ...
}
}
-sub add_conflicted_method {
+sub add_conflicting_method {
my $self = shift;
my $method;
$method = shift;
}
else {
- $method = $self->conflicted_method_metaclass->new(@_);
+ $method = $self->conflicting_method_metaclass->new(@_);
}
$self->add_required_methods($method);
Removes the named methods from the role's list of required methods.
-=item B<< $metarole->add_conflicted_method(%params) >>
+=item B<< $metarole->add_conflicting_method(%params) >>
-Instantiate the parameters as a L<Moose::Meta::Role::Method::Conflicted>
+Instantiate the parameters as a L<Moose::Meta::Role::Method::Conflicting>
object, then add it to the required method list.
=back
if ($seen) {
if ($seen->{method}->body != $method->{method}->body) {
- $c->add_conflicted_method(
+ $c->add_conflicting_method(
name => $method->{name},
roles => [$method->{role}->name, $seen->{role}->name],
);
$role2->get_method($method_name)->body != $role1->get_method($method_name)->body) {
# method conflicts between roles result
# in the method becoming a requirement
- $role2->add_conflicted_method(
+ $role2->add_conflicting_method(
name => $method_name,
roles => [$role1->name, $role2->name],
);
-package Moose::Meta::Role::Method::Conflicted;
+package Moose::Meta::Role::Method::Conflicting;
use strict;
use warnings;
=head1 NAME
-Moose::Meta::Role::Method::Conflicted - A Moose metaclass for conflicted methods in Roles
+Moose::Meta::Role::Method::Conflicting - A Moose metaclass for conflicting methods in Roles
=head1 DESCRIPTION
=head1 INHERITANCE
-C<Moose::Meta::Role::Method::Conflicted> is a subclass of
+C<Moose::Meta::Role::Method::Conflicting> is a subclass of
L<Moose::Meta::Role::Method::Required>.
=head1 METHODS
::throws_ok {
with 'Role::Bling', 'Role::Bling::Bling';
- } qr/Due to a method name conflict in roles 'Role::Bling' and 'Role::Bling::Bling', the method 'bling' must be implemented by 'My::Test3'/, '... role methods conflicted and method was required';
+ } qr/Due to a method name conflict in roles 'Role::Bling' and 'Role::Bling::Bling', the method 'bling' must be implemented by 'My::Test3'/, '... role methods conflict and method was required';
package My::Test4;
use Moose;
::throws_ok {
with 'Role::Boo', 'Role::Boo::Hoo';
} qr/We have encountered an attribute conflict/,
- '... role attrs conflicted and method was required';
+ '... role attrs conflict and method was required';
package My::Test8;
use Moose;
::throws_ok {
with 'Role::Boo', 'Role::Boo::Hoo';
} qr/We have encountered an attribute conflict/,
- '... role attrs conflicted and cannot be manually disambiguted';
+ '... role attrs conflict and cannot be manually disambiguted';
}
{
# check that when a role is added to another role
- # and they conflict and the method they conflicted
+ # and they conflict and the method they conflict
# with is then required.
package Role::A::Conflict;