Subject: | Hash randomization failure with perl 5.17 |
Hello,
On perl 5.17.8, t/08helpers.t has an intermittent failure in the following test:
is $i->helper->{loader_args}{moniker_map},
q{{authors => "AUTHORS",books => "BOOKS"}},
'loader hash arg as string';
The failure message is:
# Failed test 'loader hash arg as string'
# at t/08helper.t line 47.
# got: '{books => "BOOKS",authors => "AUTHORS"}'
# expected: '{authors => "AUTHORS",books => "BOOKS"}'
I think hash order dependency is the likely cause. I was able to fix it by adding the following
to Catalyst::Helper::Model::DBIC::Schema::_data_struct_to_string
--- /Users/felliott/code/cpan-modules/Catalyst-Model-DBIC-
Schema/lib/Catalyst/Helper/Model/DBIC/Schema.pm 2013-01-23 15:49:55.000000000
-0500
+++ lib/Catalyst/Helper/Model/DBIC/Schema.pm 2013-01-23 16:17:24.000000000 -0500
@@ -502,6 +502,7 @@
local $Data::Dumper::Terse = 1;
local $Data::Dumper::Quotekeys = 0;
+ local $Data::Dumper::Sortkeys = 1;
local $Data::Dumper::Indent = 0;
local $Data::Dumper::Useqq = 1;
All other tests pass with this patch applied. Thank you for your time and effort and have a
great day!
Cheers,
Fitz