foreach my $method (@all_methods) {
if (exists $seen{$method->{name}}) {
if ($seen{$method->{name}}->body != $method->{method}->body) {
- $c->add_required_methods($method->{name});
+ $c->add_conflicted_method(name => $method->{name});
delete $method_map{$method->{name}};
next;
}
$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_required_methods($method_name);
+ $role2->add_conflicted_method(
+ name => $method_name,
+ roles => [$role1->name, $role2->name],
+ );
}
else {
# add it, although it could be overridden