bump CMOP prereq to 0.85
[gitmo/Moose.git] / lib / Moose / Meta / Role / Application / ToRole.pm
index b948144..59d806f 100644 (file)
@@ -6,7 +6,7 @@ use metaclass;
 
 use Scalar::Util    'blessed';
 
-our $VERSION   = '0.76';
+our $VERSION   = '0.80';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -35,11 +35,12 @@ sub check_role_exclusions {
 
 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);
     }
 }
@@ -105,7 +106,10 @@ sub apply_methods {
             $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