From: Shawn M Moore Date: Sun, 31 May 2009 01:59:02 +0000 (-0400) Subject: Basic conflict message X-Git-Tag: 0.80~31 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=884837f36d1800729e8a114fea5fb1f711e6c379;p=gitmo%2FMoose.git Basic conflict message --- diff --git a/lib/Moose/Meta/Role/Application/ToClass.pm b/lib/Moose/Meta/Role/Application/ToClass.pm index 33fb327..69d7bc0 100644 --- a/lib/Moose/Meta/Role/Application/ToClass.pm +++ b/lib/Moose/Meta/Role/Application/ToClass.pm @@ -73,7 +73,21 @@ sub check_required_methods { my $error = ''; - if (@missing) { + my @conflicts = grep { $_->is_conflict } @missing; + + if (@conflicts) { + my $conflict = $conflicts[0]; + + $error + .= q{'} + . $role->name + . "' requires the method '" + . $conflict->name + . "' to be implemented by '" + . $class->name + . "' due to a method conflict" + } + elsif (@missing) { my $noun = @missing == 1 ? 'method' : 'methods'; my $list