CC: | perl5-porters [...] perl.org |
Subject: | hash order dependency bug in tests |
Hi,
I have been working on making it possible to add new hash algorithms to
perl core and on making the hash seed random per process for security
reasons.
In my work on this I have encountered a hash order dependency bug in
t/23depth.t. The attached patch fixes the bug and does a version bump.
It would be really nice if this or an equivalent fix could get applied
sometime soon as I would like to merge my hash changes to core soon and
this is a roadblock.
Thanks,
Yves
Subject: | module_pluggable.patch |
commit 3fdc3f3c62cdc14e6ac68a305ed7762df7d85fc4
Author: Yves Orton <demerphq@gmail.com>
Date: Mon Aug 27 08:55:32 2012 +0200
fix hash key order dependency from cpan/Module-Pluggable/t/23depth.t
Hash seed randomization causes the order to change per process.
I have bumped Module-Pluggable's version here.
diff --git a/cpan/Module-Pluggable/lib/Module/Pluggable.pm b/cpan/Module-Pluggable/lib/Module/Pluggable.pm
index 5ce4ca9..eda2010 100644
--- a/cpan/Module-Pluggable/lib/Module/Pluggable.pm
+++ b/cpan/Module-Pluggable/lib/Module/Pluggable.pm
@@ -9,7 +9,7 @@ use Module::Pluggable::Object;
# Peter Gibbons: I wouldn't say I've been missing it, Bob!
-$VERSION = '4.3';
+$VERSION = '4.4'; # core release only!
$FORCE_SEARCH_ALL_PATHS = 0;
sub import {
diff --git a/cpan/Module-Pluggable/t/23depth.t b/cpan/Module-Pluggable/t/23depth.t
index 51ccfca..b451b89 100644
--- a/cpan/Module-Pluggable/t/23depth.t
+++ b/cpan/Module-Pluggable/t/23depth.t
@@ -8,7 +8,7 @@ use Test::More tests => 2;
my $min = MinTest->new();
my $max = MaxTest->new();
-is_deeply([qw(MyOtherTest::Plugin::Bar MyOtherTest::Plugin::Foo MyOtherTest::Plugin::Quux)], [$max->plugins], "min depth");
+is_deeply([sort qw(MyOtherTest::Plugin::Bar MyOtherTest::Plugin::Foo MyOtherTest::Plugin::Quux)], [sort $max->plugins], "min depth");
is_deeply([qw(MyOtherTest::Plugin::Quux::Foo)], [$min->plugins], "max depth");