bump version to 0.82
[gitmo/Moose.git] / lib / Moose / Meta / Role / Application / RoleSummation.pm
index f632c05..309a08d 100644 (file)
@@ -8,7 +8,7 @@ use Scalar::Util 'blessed';
 
 use Moose::Meta::Role::Composite;
 
-our $VERSION   = '0.79';
+our $VERSION   = '0.82';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -167,15 +167,21 @@ sub apply_methods {
 
     my (%seen, %method_map);
     foreach my $method (@all_methods) {
-        if (exists $seen{$method->{name}}) {
-            if ($seen{$method->{name}}->body != $method->{method}->body) {
-                $c->add_conflicted_method(name => $method->{name});
+        my $seen = $seen{$method->{name}};
+
+        if ($seen) {
+            if ($seen->{method}->body != $method->{method}->body) {
+                $c->add_conflicting_method(
+                    name  => $method->{name},
+                    roles => [$method->{role}->name, $seen->{role}->name],
+                );
+
                 delete $method_map{$method->{name}};
                 next;
             }
         }
 
-        $seen{$method->{name}}       = $method->{method};
+        $seen{$method->{name}}       = $method;
         $method_map{$method->{name}} = $method->{method};
     }