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.0102~13 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d699590f65de3acae397f51e64c5322968b4ce44;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 3b138fa..db8b1e7 100644 --- a/lib/Moose/Meta/Attribute.pm +++ b/lib/Moose/Meta/Attribute.pm @@ -1027,7 +1027,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}";