use Scalar::Util 'blessed';
-our $VERSION = '0.76';
+our $VERSION = '0.80';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
sub check_required_methods {
my ($self, $role1, $role2) = @_;
- foreach my $required_method_name ($role1->get_required_method_list) {
+ foreach my $required_method ($role1->get_required_method_list) {
+ my $required_method_name = $required_method->name;
next if $self->is_aliased_method($required_method_name);
- $role2->add_required_methods($required_method_name)
+ $role2->add_required_methods($required_method)
unless $role2->find_method_by_name($required_method_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_required_methods($method_name);
+ $role2->add_conflicting_method(
+ name => $method_name,
+ roles => [$role1->name, $role2->name],
+ );
}
else {
# add it, although it could be overridden