Bug#974143: libencode-arabic-perl: autopkgtest regression with Perl 5.32: Useless use of /d modifier in transliteration operator
On Tue, 10 Nov 2020 15:26:43 +, Niko Tyni wrote: > Given the transliteration lists are built dynamically in the code, maybe > the thing to do is just to insert some "no warnings 'misc'" declarations > to suppress the warnings. Some random notes: 1) popcon: installed: 9 = vote: 1 + old: 7 + recent: 1 + no_files: 0 2) The following trivial patch makes the autopkgtest pass: #v+ --- a/lib/Encode/Arabic/Buckwalter.pm +++ b/lib/Encode/Arabic/Buckwalter.pm @@ -158,6 +158,9 @@ undef +# https://bugs.debian.org/974143 +no warnings 'misc'; + eval q / sub encoder ($) { --- a/lib/Encode/Arabic/Habash.pm +++ b/lib/Encode/Arabic/Habash.pm @@ -160,6 +160,9 @@ undef +# https://bugs.debian.org/974143 +no warnings 'misc'; + eval q / sub encoder ($) { --- a/lib/Encode/Arabic/Parkinson.pm +++ b/lib/Encode/Arabic/Parkinson.pm @@ -154,6 +154,9 @@ undef +# https://bugs.debian.org/974143 +no warnings 'misc'; + eval q / sub encoder ($) { #v- 3a) This also turns off other warnings (obviously, the whole 'misc' category); 3b) but actually the code blocks end after this operation so there shouldn't be much left of ignored warnings … Cheers, gregor -- .''`. https://info.comodo.priv.at -- Debian Developer https://www.debian.org : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06 `. `' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe `- NP: Bettina Wegner: Meinetwegen signature.asc Description: Digital Signature
Bug#974143: libencode-arabic-perl: autopkgtest regression with Perl 5.32: Useless use of /d modifier in transliteration operator
Package: libencode-arabic-perl Version: 14.2-1 Severity: serious User: debian-p...@lists.debian.org Usertags: perl-5.32-transition Control: block 968912 with -1 Control: affects -1 libelixirfm-perl It looks like Perl 5.32 caused a regression in the libencode-arabic-perl (and transitively libelixirfm-perl) autopkgtest checks. The failure boils down to this: # perl -we 'use Encode::Arabic' Useless use of /d modifier in transliteration operator at (eval 5) line 6. Useless use of /d modifier in transliteration operator at (eval 7) line 6. Useless use of /d modifier in transliteration operator at (eval 9) line 6. Running with 'perl -d' shows these come from Useless use of /d modifier in transliteration operator at (eval 10)[/usr/share/perl5/Encode/Arabic/Habash.pm:163] line 6. Useless use of /d modifier in transliteration operator at (eval 8)[/usr/share/perl5/Encode/Arabic/Parkinson.pm:157] line 6. Useless use of /d modifier in transliteration operator at (eval 6)[/usr/share/perl5/Encode/Arabic/Buckwalter.pm:161] line 6. Quoting https://perldoc.perl.org/perldiag#Useless-use-of-/d-modifier-in-transliteration-operator (W misc) You have used the /d modifier where the searchlist has the same length as the replacelist. The difference between Perl versions seems to be that 5.32 has become smarter about non-ASCII character ranges, as seen with # perl -we '$0 =~ tr/\x{0626}-\x{0628}/abc/d' which warns with 5.32 but not with 5.30. I'm guessing this changed somewhere around https://github.com/Perl/perl5/commits/f34acfecc286f2eff2450db713da005d888a7317 and it looks to me like this is not a regression in Perl and Encode::Arabic needs to adapt. Given the transliteration lists are built dynamically in the code, maybe the thing to do is just to insert some "no warnings 'misc'" declarations to suppress the warnings. Alternatively, disabling the autopkgtest check would lower the severity of this (but note that at least libelixirfm-perl would also need to be changed.) The autopkgtest regression makes this a blocker for Perl 5.32 transition. -- Niko Tyni nt...@debian.org