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.0100~115 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bf9c6a454e581225e7b1133af41eb75a9e4e74af;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 52c9676..1d7cfc6 100644 --- a/lib/Moose/Meta/Class.pm +++ b/lib/Moose/Meta/Class.pm @@ -136,14 +136,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 af4c774..0382afe 100644 --- a/lib/Moose/Meta/Role.pm +++ b/lib/Moose/Meta/Role.pm @@ -612,15 +612,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); } #####################################################################