On Mon, Dec 28, 2015 at 02:29:44AM +0100, gregor herrmann wrote:
> I've fixed these warnings with a patch in git, but
> 
> > # Replacement list is longer than search list at (eval 6) line 6.
> > # Replacement list is longer than search list at (eval 8) line 6.
> > # Replacement list is longer than search list at (eval 10) line 6.
> 
> that's still there. Needs further investigation.

Spelling out the character ranges in full in replacement lists seems to
do the trick here (Perl's documentation generally warns that not
spelling them out in full is dubious).  How about the attached patch?
autopkgtests pass.

-- 
Colin Watson                                       [[email protected]]
Description: Spell out Unicode ranges in full in replacement expressions
 Otherwise, Perl 5.22 gives us "Replacement list is longer than search list"
 warnings.  We also have to be more careful about when to apply the /d
 modifier to tr when decoding, to avoid "Useless use of /d modifier in
 transliteration operator" warnings after fixing the previous warnings.
Origin: vendor
Bug-Debian: https://bugs.debian.org/809094
Author: Colin Watson <[email protected]>
Last-Update: 2015-12-29

Index: b/lib/Encode/Arabic/Buckwalter.pm
===================================================================
--- a/lib/Encode/Arabic/Buckwalter.pm
+++ b/lib/Encode/Arabic/Buckwalter.pm
@@ -218,9 +218,11 @@
                     : q [\x{0640}] ) .
                 q [\x{0623}\x{0624}\x{0625}] .
                 q [\x{060C}\x{061B}\x{061F}] .
-                q [\x{0621}\x{0622}\x{0626}-\x{063A}\x{0641}-\x{064A}] .
+                q [\x{0621}\x{0622}\x{0626}\x{0627}\x{0628}\x{0629}\x{062A}\x{062B}\x{062C}\x{062D}\x{062E}] .
+                q [\x{062F}\x{0630}\x{0631}\x{0632}\x{0633}\x{0634}\x{0635}\x{0636}\x{0637}\x{0638}\x{0639}] .
+                q [\x{063A}\x{0641}\x{0642}\x{0643}\x{0644}\x{0645}\x{0646}\x{0647}\x{0648}\x{0649}\x{064A}] .
                 q [\x{067E}\x{0686}\x{0698}\x{06A4}\x{06AF}] .
-                q [\x{0660}-\x{0669}] .
+                q [\x{0660}\x{0661}\x{0662}\x{0663}\x{0664}\x{0665}\x{0666}\x{0667}\x{0668}\x{0669}] .
                 ( $mode == 0
                     ? q [\x{0671}]
                     : q [\x{0627}] ) .
@@ -228,7 +230,7 @@
                     ? ''
                     : q [\x{0651}] . ( $mode == 2
                                     ? ''
-                                    : q [\x{064B}-\x{0650}\x{0670}] . ( $mode == 3
+                                    : q [\x{064B}\x{064C}\x{064D}\x{064E}\x{064F}\x{0650}\x{0670}] . ( $mode == 3
                                                         ? ''
                                                         : q [\x{0652}] ) ) )
 
@@ -242,7 +244,7 @@
             sub decoder ($) {
 
                 $_[0] =~ tr[/ . $set[0] . q /]
-                           [/ . $set[1] . q /]d;
+                           [/ . $set[1] . q /]/ . (($kshd or $mode > 0) ? 'd' : '') . q /;
 
                 return $_[0];
             }
Index: b/lib/Encode/Arabic/Habash.pm
===================================================================
--- a/lib/Encode/Arabic/Habash.pm
+++ b/lib/Encode/Arabic/Habash.pm
@@ -220,9 +220,11 @@
                     : q [\x{0640}] ) .
                 q [\x{0623}\x{0624}\x{0625}] .
                 q [\x{060C}\x{061B}\x{061F}] .
-                q [\x{0621}\x{0622}\x{0626}-\x{063A}\x{0641}-\x{064A}] .
+                q [\x{0621}\x{0622}\x{0626}\x{0627}\x{0628}\x{0629}\x{062A}\x{062B}\x{062C}\x{062D}\x{062E}] .
+                q [\x{062F}\x{0630}\x{0631}\x{0632}\x{0633}\x{0634}\x{0635}\x{0636}\x{0637}\x{0638}\x{0639}] .
+                q [\x{063A}\x{0641}\x{0642}\x{0643}\x{0644}\x{0645}\x{0646}\x{0647}\x{0648}\x{0649}\x{064A}] .
                 q [\x{067E}\x{0686}\x{0698}\x{06A4}\x{06AF}] .
-                q [\x{0660}-\x{0669}] .
+                q [\x{0660}\x{0661}\x{0662}\x{0663}\x{0664}\x{0665}\x{0666}\x{0667}\x{0668}\x{0669}] .
                 ( $mode == 0
                     ? q [\x{0671}]
                     : q [\x{0627}] ) .
@@ -230,7 +232,7 @@
                     ? ''
                     : q [\x{0651}] . ( $mode == 2
                                     ? ''
-                                    : q [\x{064B}-\x{0650}\x{0670}] . ( $mode == 3
+                                    : q [\x{064B}\x{064C}\x{064D}\x{064E}\x{064F}\x{0650}\x{0670}] . ( $mode == 3
                                                         ? ''
                                                         : q [\x{0652}] ) ) )
 
@@ -244,7 +246,7 @@
             sub decoder ($) {
 
                 $_[0] =~ tr[/ . $set[0] . q /]
-                           [/ . $set[1] . q /]d;
+                           [/ . $set[1] . q /]/ . (($kshd or $mode > 0) ? 'd' : '') . q /;
 
                 return $_[0];
             }
Index: b/lib/Encode/Arabic/Parkinson.pm
===================================================================
--- a/lib/Encode/Arabic/Parkinson.pm
+++ b/lib/Encode/Arabic/Parkinson.pm
@@ -211,8 +211,10 @@
                     : q [\x{0640}] ) .
                 q [\x{0623}\x{0624}\x{0625}] .
                 q [\x{060C}\x{061B}\x{061F}] .
-                q [\x{0621}\x{0622}\x{0626}-\x{063A}\x{0641}-\x{064A}] .
-                q [\x{0660}-\x{0669}] .
+                q [\x{0621}\x{0622}\x{0626}\x{0627}\x{0628}\x{0629}\x{062A}\x{062B}\x{062C}\x{062D}\x{062E}] .
+                q [\x{062F}\x{0630}\x{0631}\x{0632}\x{0633}\x{0634}\x{0635}\x{0636}\x{0637}\x{0638}\x{0639}] .
+                q [\x{063A}\x{0641}\x{0642}\x{0643}\x{0644}\x{0645}\x{0646}\x{0647}\x{0648}\x{0649}\x{064A}] .
+                q [\x{0660}\x{0661}\x{0662}\x{0663}\x{0664}\x{0665}\x{0666}\x{0667}\x{0668}\x{0669}] .
                 ( $mode == 0
                     ? q [\x{0671}]
                     : q [\x{0627}] ) .
@@ -220,7 +222,7 @@
                     ? ''
                     : q [\x{0651}] . ( $mode == 2
                                     ? ''
-                                    : q [\x{064B}-\x{0650}\x{0670}] . ( $mode == 3
+                                    : q [\x{064B}\x{064C}\x{064D}\x{064E}\x{064F}\x{0650}\x{0670}] . ( $mode == 3
                                                         ? ''
                                                         : q [\x{0652}] ) ) )
 
@@ -234,7 +236,7 @@
             sub decoder ($) {
 
                 $_[0] =~ tr[/ . $set[0] . q /]
-                           [/ . $set[1] . q /]d;
+                           [/ . $set[1] . q /]/ . (($kshd or $mode > 0) ? 'd' : '') . q /;
 
                 return $_[0];
             }

Reply via email to