Subject: | New test in t/release-pp-23-readonly.t fails with Scalar::Util < 1.20 |
The new test in t/release-pp-23-readonly.t is failing for me on perl 5.8.x:
$ LC_ALL=en_US RELEASE_TESTING=1 ./Build test
t/01-validate.t ......................... ok
t/02-noop.t ............................. ok
t/03-attribute.t ........................ ok
t/04-defaults.t ......................... ok
t/05-noop_default.t ..................... ok
t/06-options.t .......................... ok
t/07-with.t ............................. ok
t/08-noop_with.t ........................ ok
t/09-regex.t ............................ ok
t/10-noop_regex.t ....................... ok
t/11-cb.t ............................... ok
t/12-noop_cb.t .......................... ok
t/13-taint.t ............................ ok
t/14-no_validate.t ...................... ok
t/15-case.t ............................. ok
t/16-normalize.t ........................ ok
t/17-callbacks.t ........................ ok
t/18-depends.t .......................... ok
t/19-untaint.t .......................... ok
t/21-can.t .............................. ok
t/22-overload-can-bug.t ................. ok
t/23-readonly.t ......................... ok
t/24-tied.t ............................. ok
t/25-undef-regex.t ...................... ok
t/26-isa.t .............................. ok
t/27-string-as-type.t ................... ok
t/28-readonly-return.t .................. ok
t/29-taint-mode.t ....................... ok
t/30-hashref-alteration.t ............... ok
t/31-incorrect-spelling.t ............... skipped: Spec validation is disabled for now
t/32-regex-as-value.t ................... ok
t/33-keep-errsv.t ....................... ok
t/34-recursive-validation.t ............. ok
t/35-default-xs-bug.t ................... ok
t/35-large-arrays.t ..................... ok
t/release-cpan-changes.t ................ ok
t/release-eol.t ......................... ok
t/release-no-tabs.t ..................... ok
t/release-pod-coverage.t ................ ok
t/release-pod-linkcheck.t ............... skipped: Test::Pod::LinkCheck required for testing POD
t/release-pod-no404s.t .................. skipped: Test::Pod::No404s required for testing POD
t/release-pod-spell.t ................... ok
t/release-pod-syntax.t .................. ok
t/release-pp-01-validate.t .............. ok
t/release-pp-02-noop.t .................. ok
t/release-pp-03-attribute.t ............. ok
t/release-pp-04-defaults.t .............. ok
t/release-pp-05-noop_default.t .......... ok
t/release-pp-06-options.t ............... ok
t/release-pp-07-with.t .................. ok
t/release-pp-08-noop_with.t ............. ok
t/release-pp-09-regex.t ................. ok
t/release-pp-10-noop_regex.t ............ ok
t/release-pp-11-cb.t .................... ok
t/release-pp-12-noop_cb.t ............... ok
t/release-pp-13-taint.t ................. ok
t/release-pp-14-no_validate.t ........... ok
t/release-pp-15-case.t .................. ok
t/release-pp-16-normalize.t ............. ok
t/release-pp-17-callbacks.t ............. ok
t/release-pp-18-depends.t ............... ok
t/release-pp-19-untaint.t ............... ok
t/release-pp-21-can.t ................... ok
t/release-pp-22-overload-can-bug.t ...... ok
# Failed test 'validate() call succeeded with Readonly spec hash'
# at t/release-pp-23-readonly.t line 44.
# got: 'The 'foo' parameter ("hello") has a type specification which is not a number. It is a string - 1.
# Use the constants exported by Params::Validate to declare types. at /builddir/build/BUILD/Params-Validate-1.09/blib/lib/Params/Validate/PP.pm line 638
# Params::Validate::PP::__ANON__('The \'foo\' parameter ("hello") has a type specification whic...') called at /builddir/build/BUILD/Params-Validate-1.09/blib/lib/Params/Validate/PP.pm line 470
# Params::Validate::PP::_validate_one_param('hello', 'HASH(0x6c9cd0)', 'HASH(0x8762b8)', 'The \'foo\' parameter ("hello")') called at /builddir/build/BUILD/Params-Validate-1.09/blib/lib/Params/Validate/PP.pm line 339
# Params::Validate::PP::validate('ARRAY(0x92de00)', 'HASH(0x92dec0)') called at t/release-pp-23-readonly.t line 43
# eval {...} called at t/release-pp-23-readonly.t line 43
# '
# expected: ''
# Looks like you failed 1 test of 3.
t/release-pp-23-readonly.t ..............
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests
t/release-pp-24-tied.t .................. ok
t/release-pp-25-undef-regex.t ........... ok
t/release-pp-26-isa.t ................... ok
t/release-pp-27-string-as-type.t ........ ok
t/release-pp-28-readonly-return.t ....... ok
t/release-pp-29-taint-mode.t ............ ok
t/release-pp-30-hashref-alteration.t .... ok
t/release-pp-31-incorrect-spelling.t .... skipped: Spec validation is disabled for now
t/release-pp-32-regex-as-value.t ........ ok
t/release-pp-33-keep-errsv.t ............ ok
t/release-pp-34-recursive-validation.t .. ok
t/release-pp-35-default-xs-bug.t ........ ok
t/release-pp-35-large-arrays.t .......... ok
t/release-pp-is-loaded.t ................ ok
t/release-xs-is-loaded.t ................ ok
t/release-xs-segfault.t ................. ok
Test Summary Report
-------------------
t/34-recursive-validation.t (Wstat: 0 Tests: 1 Failed: 0)
TODO passed: 1
t/release-pp-23-readonly.t (Wstat: 256 Tests: 3 Failed: 1)
Failed test: 3
Non-zero exit status: 1
Files=81, Tests=1264, 4 wallclock secs ( 0.35 usr 0.09 sys + 3.14 cusr 0.34 csys = 3.92 CPU)
Result: FAIL
Failed 1/81 test programs. 1/1264 subtests failed.
The regular XS version of the test works fine as you can see.
I also saw this on a system with perl 5.10.0.
After some investigation, I found that updating the failing system from Scalar-List-Utils 1.19 to Scalar-List-Utils 1.20 resolved the problem. Perhaps that should be reflected in the developer prerequisites?