From: gfx <gfuji@cpan.org>
Date: Fri, 4 Sep 2009 12:20:50 +0000 (+0900)
Subject: Fix another keys ordering bug.
X-Git-Tag: 0.89_02~42
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bb3655457b64d4829b693da95f06409f84ba3f80;p=gitmo%2FMoose.git

Fix another keys ordering bug.

This will will occur only on 5.8.1, but anyway one must not depend on the order of keys()/values()/each().
---

diff --git a/lib/Moose/Meta/Role/Application/ToClass.pm b/lib/Moose/Meta/Role/Application/ToClass.pm
index 570f201..8620907 100644
--- a/lib/Moose/Meta/Role/Application/ToClass.pm
+++ b/lib/Moose/Meta/Role/Application/ToClass.pm
@@ -73,6 +73,7 @@ sub check_required_methods {
 
     my $error = '';
 
+    @missing = sort { $a->name cmp $b->name } @missing;
     my @conflicts = grep { $_->isa('Moose::Meta::Role::Method::Conflicting') } @missing;
 
     if (@conflicts) {
diff --git a/t/030_roles/043_conflict_many_methods.t b/t/030_roles/043_conflict_many_methods.t
index 94f730f..384f97f 100644
--- a/t/030_roles/043_conflict_many_methods.t
+++ b/t/030_roles/043_conflict_many_methods.t
@@ -41,5 +41,5 @@ use Moose;
         'Bomb', 'Spouse',
         'Caninish', 'Treeve',
     );
-} qr/Due to method name conflicts in roles 'Bomb' and 'Spouse', the methods 'explode' and 'fuse' must be implemented or excluded by 'PracticalJoke'/;
+} qr/Due to a method name conflict in roles 'Caninish' and 'Treeve', the method 'bark' must be implemented or excluded by 'PracticalJoke'/;