]> git.ipfire.org Git - thirdparty/autoconf.git/commit
autom4te: Don’t crash if Data::Dumper::Sortkeys is unavailable.
authorZack Weinberg <zack@owlfolio.org>
Mon, 11 Dec 2023 16:25:54 +0000 (11:25 -0500)
committerZack Weinberg <zack@owlfolio.org>
Mon, 11 Dec 2023 16:40:11 +0000 (11:40 -0500)
commit185d1db28b48f78eb480a8d19db100ecda7a4fc1
treec8d400e28eb91d2bb7a588572916fd3ae1412589
parent39d96e6fff7ceae63b823872602caf4d255a38c8
autom4te: Don’t crash if Data::Dumper::Sortkeys is unavailable.

Commit c2ab755698db245898a4cc89149eb5df256e4bd0 added an unconditional
use of Data::Dumper’s Sortkeys method, which was added in version
2.12_01 of that module.  In terms of Perl versions, it is available in
5.8.x and later, and in 5.6.2, but not in 5.6.1 or earlier. At the
time, our minimum Perl version was 5.10, but we lowered it to 5.6.0
again in 05e295b60cfdf378b7ed8c1f8563a5644d5d4689.  It seems that
commit was not actually tested with 5.6.1 or earlier.

As we are only using Sortkeys to facilitate manual comparison of
autom4te.cache/requests files, we can just ignore the method lookup
failure with 5.6.[01] and everything will work fine without it.

Tested on x86_64-unknown-netbsd9.3 with perl 5.6.1.

* lib/Autom4te/C4che.pm (marshall): Ignore method lookup failure for
  Data::Dumper::Sortkeys with very old perl.
* lib/Autom4te/Request.pm (marshall): Likewise.
lib/Autom4te/C4che.pm
lib/Autom4te/Request.pm