In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/e14160708b4f2129dece6ee10bdf6cb7f5abbadb?hp=377a74500444ecdab6e964cb221da54cd6e5ab89>
- Log ----------------------------------------------------------------- commit e14160708b4f2129dece6ee10bdf6cb7f5abbadb Author: Steffen Mueller <[email protected]> Date: Fri Aug 4 09:47:01 2017 +0200 Data::Dumper: Prevent XS deparse being used on old perls Aaron's improvement mysteriously breaks on old perls. Instead of investing hours into investigation of what will likely turn out to be old perl bugs, we simply don't use XS deparse on ancient perls. This simply restores long standing behaviour, so it is no regression to any released version of Data::Dumper. Tested, still fails on 5.12 and earlier, works on 5.18, not sure about intermediaries. Could somebody who needs old perls to work please step up to investigate? Includes necessary version bump. ----------------------------------------------------------------------- Summary of changes: dist/Data-Dumper/Changes | 10 ++++++++++ dist/Data-Dumper/Dumper.pm | 19 ++++++++++++++----- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/dist/Data-Dumper/Changes b/dist/Data-Dumper/Changes index b2f61e5ab0..95e3a8ab16 100644 --- a/dist/Data-Dumper/Changes +++ b/dist/Data-Dumper/Changes @@ -6,6 +6,16 @@ Changes - public release history for Data::Dumper =over 8 +=item 2.167_02 (Aug 4 2017) + +Attempt to work around XS deparse issues on old perls. +According to the few old perls at my disposure, this now repairs, +for example 5.18, but 5.8.9 still barfs. My debugging hasn't +really come up with much since all changes other than the deparse +change look benign to me. +Can someone who uses ancient perls please step up and take a look? +--Steffen + =item 2.167_01 (Jul 31 2017) CPAN dev release with the accumulated changes from core perl. diff --git a/dist/Data-Dumper/Dumper.pm b/dist/Data-Dumper/Dumper.pm index ef1dd9e26e..8e24a014aa 100644 --- a/dist/Data-Dumper/Dumper.pm +++ b/dist/Data-Dumper/Dumper.pm @@ -10,7 +10,7 @@ package Data::Dumper; BEGIN { - $VERSION = '2.167_01'; # Don't forget to set version and release + $VERSION = '2.167_02'; # Don't forget to set version and release } # date in POD below! #$| = 1; @@ -18,6 +18,8 @@ BEGIN { use 5.006_001; require Exporter; +use constant IS_PRE_520_PERL => $] < 5.020; + use Carp (); BEGIN { @@ -224,12 +226,19 @@ sub Names { sub DESTROY {} sub Dump { - return &Dumpxs - unless $Data::Dumper::Useperl || (ref($_[0]) && $_[0]->{useperl}) + # On old versions of perl, the xs-deparse support can fail + # mysteriously. Barring copious spare time, it's best to revert + # to the previously standard behavior of using the pure perl dumper + # for deparsing on old perls. --Steffen + if (IS_PRE_520_PERL and ($Data::Dumper::Deparse or (ref($_[0]) && $_[0]->{deparse}))) { + return &Dumpperl; + } + return &Dumpxs + unless $Data::Dumper::Useperl || (ref($_[0]) && $_[0]->{useperl}) # Use pure perl version on earlier releases on EBCDIC platforms || (! $IS_ASCII && $] lt 5.021_010); - return &Dumpperl; + return &Dumpperl; } # @@ -1465,7 +1474,7 @@ modify it under the same terms as Perl itself. =head1 VERSION -Version 2.167_01 +Version 2.167_02 =head1 SEE ALSO -- Perl5 Master Repository
