<div dir="ltr">Package: libregexp-pattern-license-perl<div>Version: v3.10.0</div><div><br></div><div>This package (as distributed on CPAN) will fail tests on Perl 5.37.10. The code exploits historically undefined behavior which has become defined in 5.37.10.</div><div><br></div><div>Historically perl would "accumulate" capture buffer data in a quantified subgroup in a regular expression, eg, "abc"=~/(?:(a)|(b)|(c))+/ would leave $1, $2, $3 defined as "a", "b", "c". This behavior is problematic and has been changed in Perl 5.37.10 so that after such an expression only one of the three capture buffers will be defined, that which was matched in the last iteration of the  quantified group. </div><div><br></div><div>The test code for Regexp::Pattern::License exploits this undefined behavior to accumulate the results of multiple iterations of a quantified group. Replacing that code with a while (/.../g) loop fixes the problem. The attached patch fixes it so that the code should work on older and newer perls regardless as to the status of this undefined behavior.</div><div><br></div><div>Note this perl package uses the debian bug tracker, however this bug is visible on any platform using Perl 5.37.10 or later. I am not filing this bug report from a debian install, so I cannot provide any of the debian specific data you request on your bug tracker page.</div><div><br></div><div>Also please note that <a href="https://metacpan.org/pod/Regexp::Pattern::License">https://metacpan.org/pod/Regexp::Pattern::License</a> specifies that the source code repository for this package is <a href="https://salsa.debian.org/build-common-team/regexp-pattern-license.git">https://salsa.debian.org/build-common-team/regexp-pattern-license.git</a> however that code does not build as it has incomplete Dist::Zilla configuration. Thus I was not able to produce a patch against your repo, the attached patch is against the released code on CPAN. </div><div><br></div><div>See also the "BBC" (Blead Breaks CPAN) Perl5 bug report ticket for this: <a href="https://github.com/Perl/perl5/issues/21001">https://github.com/Perl/perl5/issues/21001</a></div><div><br></div><div>cheers,</div><div>Yves<br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">perl -Mre=debug -e "/just|another|perl|hacker/"</div></div></div>