automake: account for perl hash order randomization
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 21 Jul 2013 16:58:05 +0000 (17:58 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 31 Oct 2013 00:26:33 +0000 (00:26 +0000)
commit52e6404590f0a8824cf5f9522a2dc3151c2af9f3
treee4ec826064680c1e7fa867ce6314273335d2f58c
parent073b1fe85068620eb6c06432b1be13c40394a177
automake: account for perl hash order randomization

Try to explicitly order the keys of some perl hashes when looping
on them to do sanity/correctness checks and possibly display warning
messages; this should ensure a more reproducible output.  Not really
a big deal, but I prefer to keep the order of such output reproducible
if possible.

Issue revealed by spurious testsuite failures with perl 5.18, as
reported in automake bug#14891.  See also:
<http://search.cpan.org/dist/perl-5.18.0/pod/perldelta.pod#Hash_randomization>
<http://onionstand.blogspot.ie/2012/12/are-you-relying-on-hash-keys-being.html>

* lib/Automake/Variable.pm (variables): Explicitly order the values of
the returned Automake::Variable instances.
(variables_dump): Simplify, using the knowledge that 'variables()' now
sorts its output.
* t/preproc-errmsg.sh: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
NEWS
lib/Automake/Variable.pm
t/preproc-errmsg.sh