Subject: | Test failures on modern Perls |
This module fails its tests on modern Perls (i.e. any since hash key ordering was made truly random in 5.18). The tests "members" and/or "members 2" will typically fail; I haven't noticed any other failures.
I believe this is down to a lack of sorting of the keys of various hashes; the patch below patches the test failures, but there are a couple of other places in the same function where the keys of a hash might want sorting as well, but the (understandably) limited tests haven't stressed that code enough. I haven't looked at the code in enough detail to fully understand it, though.
--- lib/Text/Sequence.pm~ 2004-07-06 17:33:55.000000000 +0100
+++ lib/Text/Sequence.pm 2016-01-13 21:50:04.233902678 +0000
@@ -194,7 +194,7 @@
}
# Now the remaining elements (if any) all get swept into the
# %d non-padded bucket.
- my @members = ( map @{ $formats->{$_} }, keys %$formats );
+ my @members = ( map @{ $formats->{$_} }, sort keys %$formats );
push @seqs, Text::Sequence->new($cand, @members) if @members;
}