From: Dave Rolsky Date: Thu, 16 Jun 2011 15:34:21 +0000 (-0500) Subject: Sort the keys in %handles when making delegation methods X-Git-Tag: 2.0008~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0f3da1b46e7e1915482bd1914145fff4267a9189;p=gitmo%2FMoose.git Sort the keys in %handles when making delegation methods This makes it easier to find a given generated method when dumping the generated source --- diff --git a/lib/Moose/Meta/Attribute.pm b/lib/Moose/Meta/Attribute.pm index ed87709..c7d6ac0 100644 --- a/lib/Moose/Meta/Attribute.pm +++ b/lib/Moose/Meta/Attribute.pm @@ -961,7 +961,7 @@ sub install_delegation { # install the delegation ... my $associated_class = $self->associated_class; - foreach my $handle (keys %handles) { + foreach my $handle (sort keys %handles) { my $method_to_call = $handles{$handle}; my $class_name = $associated_class->name; my $name = "${class_name}::${handle}";