Bug#1078071: libregexp-pattern-license-perl: warns on usage with Perl 5.40

Niko Tyni ntyni at debian.org
Tue Aug 6 16:39:00 BST 2024


Package: libregexp-pattern-license-perl
Version: 3.11.0-1
Severity: important
User: debian-perl at lists.debian.org
Usertags: perl-5.40-transition

This module warns on usage with Perl 5.40 (currently in experimental) when
libre-engine-re2-perl (which is not a dependency, just a recommendation)
is not installed.

  $ perl -e 'use Regexp::Pattern::License'
  Attempt to call undefined import method with arguments ("-strict" ...) via package "re::engine::RE2" (Perhaps you forgot to load the package?) at /usr/share/perl5/Regexp/Pattern/License.pm line 15550.

This causes an autopkgtest regression and also makes licensecheck
fail its test suite, hence the severity.

Looking at the code around line 15550, I suspect the BEGIN {}
block inside a conditional gets executed unconditionally but not
intentionally. Consider:

  % perl -e 'if (0) { BEGIN { warn }}'
  Warning: something's wrong at -e line 1.

Information on the new warning can be found at

  https://metacpan.org/dist/perl/view/pod/perldelta.pod#Calling-the-import-method-of-an-unknown-package-produces-a-warning

A full build log of licensecheck with Perl 5.40 is at

  https://perl.debian.net/rebuild-logs/perl-5.40-throwaway/licensecheck_3.3.9-1/licensecheck_3.3.9-1_amd64-2024-08-04T14:51:09Z.build
-- 
Niko



More information about the pkg-perl-maintainers mailing list