This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix Storable test for pre-5.19.2 threaded perls
authorZefram <zefram@fysh.org>
Fri, 21 Jul 2017 07:50:12 +0000 (08:50 +0100)
committerZefram <zefram@fysh.org>
Fri, 21 Jul 2017 07:50:12 +0000 (08:50 +0100)
commit50621bf1d40510490a77db174fbc16c1fbfb8aea
tree06662a8955400528ed1ea05410b6900b7e6018f2
parent40c7720facf5e6944805c593ad6a5604ad88c9ce
fix Storable test for pre-5.19.2 threaded perls

The test of Storable's identity-preserving handling of the immortal
scalars ran into trouble with an old bug regarding overloading of the
PADTMP flag, which could prevent the test script getting actual references
to the immortal truth values in order to feed to Storable and to compare
its output against.  On the affected perls, compiling code that includes
a const op whose value is an immortal makes subsequent executions of the
refgen operator on that immortal scalar copy it, breaking its identity.
Loading the testing infrastructure modules could easily perform such
compilation, though whether it actually does depends on the versions of
the modules.  Work around this by taking the platinum-iridium immortal
references first thing in the test script, before loading anything that
could break it.
dist/Storable/t/blessed.t