if ($self->is_method_aliased($method_name)) {
my $aliased_method_name = $self->get_method_aliases->{$method_name};
- # it if it has one already
+
if ($role2->has_method($aliased_method_name) &&
- # and if they are not the same thing ...
$role2->get_method($aliased_method_name)->body != $role1->get_method($method_name)->body) {
require Moose;
next if $self->is_method_excluded($method_name);
- # it if it has one already
if ($role2->has_method($method_name) &&
- # and if they are not the same thing ...
$role2->get_method($method_name)->body != $role1->get_method($method_name)->body) {
# method conflicts between roles result
# in the method becoming a requirement
);
}
else {
- # add it, although it could be overridden
$role2->add_method(
$method_name,
$role1->get_method($method_name)