Thanks for the BBC, Andreas.
Smylers, the problem is that more_features.t uses a check with multiple callbacks. Those
callbacks are passed to Params::Check in a hash, and are then processed in hash order. So if an
argument fails more than one callback check, the error reported depends on the order of the
particular hash in question.
My fix just makes the relevant test more lenient: it permits either of the two possible errors.
diff -ur Params-Validate-Checks-0.01.orig/Changes Params-Validate-Checks-0.01/Changes
--- Params-Validate-Checks-0.01.orig/Changes 2008-02-10 23:37:47.000000000 +0000
+++ Params-Validate-Checks-0.01/Changes 2012-11-25 17:52:47.000000000 +0000
@@ -1,5 +1,10 @@
= Params-Validate-Checks Changes =
+== 0.02 ==
+
+* Fix RT#81430: intermittent test failures when run under newer Perl (with
+ different hash ordering); Aaron Crane <arc@cpan.org>
+
== 0.01 ==
* initial release
diff -ur Params-Validate-Checks-0.01.orig/t/more_features.t Params-Validate-Checks-0.01/t/more_features.t
--- Params-Validate-Checks-0.01.orig/t/more_features.t 2008-02-10 23:37:47.000000000 +0000
+++ Params-Validate-Checks-0.01/t/more_features.t 2012-11-25 17:51:03.000000000 +0000
@@ -44,7 +44,7 @@
'optional argument can be omitted';
throws_ok { repeat(message => 'ooops', count => 2, suffix => "\n\n\n") }
- qr/did not pass the 'one line' callback/,
+ qr/did not pass the '(?:one line|not empty)' callback/,
'complains if optional parameter supplied but invalid';
throws_ok { repeat(message => 'ooops', count => 2, suffix => undef) }