From: Jesse Luehrs Date: Mon, 9 May 2011 09:00:56 +0000 (-0500) Subject: sort some things to allow for some better caching X-Git-Tag: 2.0004~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9c69f10649b77fca6d0cc172413ff5c610cae776;p=gitmo%2FMoose.git sort some things to allow for some better caching --- diff --git a/lib/Moose/Meta/Class.pm b/lib/Moose/Meta/Class.pm index 31e7eab..cdf7f91 100644 --- a/lib/Moose/Meta/Class.pm +++ b/lib/Moose/Meta/Class.pm @@ -137,14 +137,14 @@ sub _anon_cache_key { return; } - $key .= '<' . join('+', 'a', join('%', %$alias), - 'e', join('%', @$excludes)) . '>'; + $key .= '<' . join('+', 'a', join('%', sort %$alias), + 'e', join('%', sort @$excludes)) . '>'; } push @role_keys, $key; } - my $role_key = join('|', @role_keys); + my $role_key = join('|', sort @role_keys); # Makes something like Super::Class|Super::Class::2=Role|Role::1 return join('=', $superclass_key, $role_key); diff --git a/lib/Moose/Meta/Role.pm b/lib/Moose/Meta/Role.pm index 00aa609..6a29192 100644 --- a/lib/Moose/Meta/Role.pm +++ b/lib/Moose/Meta/Role.pm @@ -613,15 +613,15 @@ sub _anon_cache_key { return; } - $key .= '<' . join('+', 'a', join('%', %$alias), - 'e', join('%', @$excludes)) . '>'; + $key .= '<' . join('+', 'a', join('%', sort %$alias), + 'e', join('%', sort @$excludes)) . '>'; } push @role_keys, $key; } # Makes something like Role|Role::1 - return join('|', @role_keys); + return join('|', sort @role_keys); } #####################################################################