This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
restore compatibility with old versions of ExtUtils::ParseXS
authorGraham Knop <haarg@haarg.org>
Tue, 24 Nov 2020 20:27:43 +0000 (21:27 +0100)
committerKarl Williamson <khw@cpan.org>
Sun, 29 Nov 2020 16:02:56 +0000 (09:02 -0700)
commitb33c3c199a4d1a7f93b3afad435f77c0ff4988ba
treed91dc579451206c8dfec53af1ced3b733359082b
parenta0412c00a8c16af0955edebcaf0d271542c97582
restore compatibility with old versions of ExtUtils::ParseXS

ExtUtils::ParseXS used to include a function called "errors", which was
documented. In was renamed to report_error_count in version 3.01 (perl
5.15.1) although the documentation wasn't fixed until 3.21 (perl 5.19.2).
As a documented function, this is a backwards compatibility issue.

It is possible for this to lead to errors when installing modules from
CPAN. If you are using the version of ExtUtils::ParseXS that comes with
core, between running the Makefile.PL and make, fulfilling prereqs can
result in upgrading ExtUtils::ParseXS. When Makefile.PL is run, the
generated Makefile gets the full path to xsubpp saved in it. Then when
upgraded from CPAN, ExtUtils::ParseXS and xsubpp will be in a new
location (site_perl or a local::lib). Running make will run the old
xsubpp, but it will then try to use the new ExtUtils::ParseXS which has
broken compatibility.

Restore the errors function as a compatibility shim to fix this.
dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm