Skip Menu |
 

This queue is for tickets about the Encode-Arabic CPAN distribution.

Report information
The Basics
Id: 110786
Status: resolved
Priority: 0/
Queue: Encode-Arabic

People
Owner: otakar-smrz [...] users.sf.net
Requestors: ntyni [...] iki.fi
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 14.1
Fixed in: 14.2

Attachments


Subject: Regexp warnings with Perl 5.22
Please find attached two patches fixing regexp warnings with Perl 5.22.
Subject: spell_out_unicode_charclasses.patch
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 <cjwatson@ubuntu.com> 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]; }
Subject: unescaped_left_brace.patch
Description: fix "Unescaped left brace in regex is deprecated, passed through in regex" warning Origin: vendor Bug-Debian: https://bugs.debian.org/809094 Author: gregor herrmann <gregoa@debian.org> Last-Update: 2015-12-28 --- a/lib/Encode/Arabic/ArabTeX/RE.pm +++ b/lib/Encode/Arabic/ArabTeX/RE.pm @@ -60,67 +60,67 @@ $text = join '', map { exists $encode_used{$_} ? $encode_used{$_} : $_ } split '', $text; - $text =~ s/([\_\.\^]?\w)\\shadda{}/$1$1/g; - $text =~ s/(\\ham{.})\\shadda{}/$1$1/g; + $text =~ s/([\_\.\^]?\w)\\shadda\{\}/$1$1/g; + $text =~ s/(\\ham\{.\})\\shadda\{\}/$1$1/g; - $text =~ s/([\=\s\-\%])\\alif{}\\vow{a}l/$1"al-/g; - $text =~ s/([\=\s\-\%])\\alif{}l/$1al-/g; - $text =~ s/(b\\vow{i})\\alif{}l/$1-al-/g; - $text =~ s/([\=\s\-\%])\\alif{}\\vow{([ui])}/$1"$2/g; - $text =~ s/([\=\s\-\%])\\alif{}/$1i/g; - $text =~ s/(\\vow{aN})\\alif{}/$1/g; - $text =~ s/\\alif{}(\\vow{aN})/$1/g; - $text =~ s/\\vow{a}\\alif{}/\\vow{A}/g; - $text =~ s/\\alif{}/\\aux{A}/g; - - $text =~ s/\\madda{}/'A/g; - - $text =~ s/\\vow{a}\\maq{}/\\vow{Y}/g; - $text =~ s/\\maq{}(\\vow{aN})/\\vow{aNY}/g; - $text =~ s/\\vow{aN}\\maq{}/\\vow{aNY}/g; - $text =~ s/\\maq{}/\\aux{Y}/g; + $text =~ s/([\=\s\-\%])\\alif\{\}\\vow\{a\}l/$1"al-/g; + $text =~ s/([\=\s\-\%])\\alif\{\}l/$1al-/g; + $text =~ s/(b\\vow\{i\})\\alif\{\}l/$1-al-/g; + $text =~ s/([\=\s\-\%])\\alif\{\}\\vow\{([ui])\}/$1"$2/g; + $text =~ s/([\=\s\-\%])\\alif\{\}/$1i/g; + $text =~ s/(\\vow\{aN\})\\alif\{\}/$1/g; + $text =~ s/\\alif\{\}(\\vow\{aN\})/$1/g; + $text =~ s/\\vow\{a\}\\alif\{\}/\\vow{A}/g; + $text =~ s/\\alif\{\}/\\aux{A}/g; + + $text =~ s/\\madda\{\}/'A/g; + + $text =~ s/\\vow\{a\}\\maq\{\}/\\vow{Y}/g; + $text =~ s/\\maq\{\}(\\vow\{aN\})/\\vow{aNY}/g; + $text =~ s/\\vow\{aN\}\\maq\{\}/\\vow{aNY}/g; + $text =~ s/\\maq\{\}/\\aux{Y}/g; $text =~ s/i(}?)y([^aiuAIUY])/I$1$2/g; # produces \ham{I}, too $text =~ s/u(}?)w([^aiuAIUY])/U$1$2/g; - $text =~ s/([iIuU]})(\\ham{a})/$1-$2/g; - $text =~ s/([\-\s])\\ham{a}([^\\])/$1'\\aux{a}$2/g; - $text =~ s/([^\}\s])\\ham{a}/$1\\aux{a}'/g; + $text =~ s/([iIuU]})(\\ham\{a\})/$1-$2/g; + $text =~ s/([\-\s])\\ham\{a\}([^\\])/$1'\\aux{a}$2/g; + $text =~ s/([^\}\s])\\ham\{a\}/$1\\aux{a}'/g; - $text =~ s/([^\-\s])(\\ham{i})/$1-$2/g; - $text =~ s/\\ham{i}([^\\])/'\\aux{i}$1/g; + $text =~ s/([^\-\s])(\\ham\{i\})/$1-$2/g; + $text =~ s/\\ham\{i\}([^\\])/'\\aux{i}$1/g; - $text =~ s/([^\}])(\\ham{w})/$1\\aux{u}$2/g; - $text =~ s/(\\ham{w})([^\\])/$1\\aux{u}$2/g; + $text =~ s/([^\}])(\\ham\{w\})/$1\\aux{u}$2/g; + $text =~ s/(\\ham\{w\})([^\\])/$1\\aux{u}$2/g; - $text =~ s/([^\}])(\\ham{y})/$1\\aux{i}$2/g; - $text =~ s/(\\ham{y})([^\\])/$1\\aux{i}$2/g; + $text =~ s/([^\}])(\\ham\{y\})/$1\\aux{i}$2/g; + $text =~ s/(\\ham\{y\})([^\\])/$1\\aux{i}$2/g; - $text =~ s/\\ham{[aiwy]}/'/g; - $text =~ s/\\ham{I}/'I/g; + $text =~ s/\\ham\{[aiwy]\}/'/g; + $text =~ s/\\ham\{I\}/'I/g; - $text =~ s/(?<![^\=\s\-\%])\\aux{A}/\\aux{i}/g; + $text =~ s/(?<![^\=\s\-\%])\\aux\{A\}/\\aux{i}/g; no strict 'refs'; if (defined ${ $cls . '::enmode' } and ${ $cls . '::enmode' } == 3) { - $text =~ s/\\vow{(.+?)}/$1/g; - $text =~ s/\\aux{(.+?)}/"$1/g; - $text =~ s/\\sukun{}/"/g; + $text =~ s/\\vow\{(.+?)\}/$1/g; + $text =~ s/\\aux\{(.+?)\}/"$1/g; + $text =~ s/\\sukun\{\}/"/g; } elsif (defined ${ $cls . '::enmode' } and ${ $cls . '::enmode' } == 2) { - $text =~ s/\\vow{(.+?)}/"$1/g; - $text =~ s/\\aux{(.+?)}/$1/g; - $text =~ s/\\sukun{}/"/g; + $text =~ s/\\vow\{(.+?)\}/"$1/g; + $text =~ s/\\aux\{(.+?)\}/$1/g; + $text =~ s/\\sukun\{\}/"/g; } elsif (defined ${ $cls . '::enmode' } and ${ $cls . '::enmode' } == 4) { - $text =~ s/\\vow{(.+?)}/$1/g; - $text =~ s/\\aux{(.+?)}/$1/g; - $text =~ s/\\sukun{}//g; + $text =~ s/\\vow\{(.+?)\}/$1/g; + $text =~ s/\\aux\{(.+?)\}/$1/g; + $text =~ s/\\sukun\{\}//g; } $text = Encode::encode "utf8", $text if Encode::is_utf8($text); @@ -157,19 +157,19 @@ $text =~ s/([\s\-])'([iI])/$1\\H{i}$2/gs; $text =~ s/([\s\-])'A/$1\\M{}/gs; - $text =~ s/(I|y\\O{})'(aN[AY]?[\s\-])/$1\\H{y}$2/gs; - $text =~ s/a'(|\\D{})(|[au]N?)([\s\-])/a\\H{a}$1$2$3/gs; - $text =~ s/a'(|\\D{})(iN?)([\s\-])/a\\H{i}$1$2$3/gs; - $text =~ s/i'(|\\D{})(|[aiu]N?)([\s\-])/i\\H{y}$1$2$3/gs; - $text =~ s/u'(|\\D{})(|[aiu]N?)([\s\-])/u\\H{w}$1$2$3/gs; - $text =~ s/'(|\\D{})(|[aiu]N?)([\s\-])/\\H{}$1$2$3/gs; - - $text =~ s/([iI]|y\\O{})'(|\\D{})/$1\\H{y}$2/g; - $text =~ s/'(|\\D{})([iI])/\\H{y}$1$2/g; - $text =~ s/([uU])'(|\\D{})/$1\\H{w}$2/g; - $text =~ s/'(|\\D{})([uU])/\\H{w}$1$2/g; - $text =~ s/A'(|\\D{})/A\\H{}$1/g; # how do you write <rA''AsuN>? - $text =~ s/a'(\\D{})/a\\H{a}$1/g; # how do you write <ra''AsuN>? + $text =~ s/(I|y\\O\{\})'(aN[AY]?[\s\-])/$1\\H{y}$2/gs; + $text =~ s/a'(|\\D\{\})(|[au]N?)([\s\-])/a\\H{a}$1$2$3/gs; + $text =~ s/a'(|\\D\{\})(iN?)([\s\-])/a\\H{i}$1$2$3/gs; + $text =~ s/i'(|\\D\{\})(|[aiu]N?)([\s\-])/i\\H{y}$1$2$3/gs; + $text =~ s/u'(|\\D\{\})(|[aiu]N?)([\s\-])/u\\H{w}$1$2$3/gs; + $text =~ s/'(|\\D\{\})(|[aiu]N?)([\s\-])/\\H{}$1$2$3/gs; + + $text =~ s/([iI]|y\\O\{\})'(|\\D\{\})/$1\\H{y}$2/g; + $text =~ s/'(|\\D\{\})([iI])/\\H{y}$1$2/g; + $text =~ s/([uU])'(|\\D\{\})/$1\\H{w}$2/g; + $text =~ s/'(|\\D\{\})([uU])/\\H{w}$1$2/g; + $text =~ s/A'(|\\D\{\})/A\\H{}$1/g; # how do you write <rA''AsuN>? + $text =~ s/a'(\\D\{\})/a\\H{a}$1/g; # how do you write <ra''AsuN>? $text =~ s/'A/\\M{}/g; $text =~ s/'a/\\H{a}a/g; $text =~ s/'Y/\\H{a}Y/g; @@ -181,7 +181,7 @@ # alas! using $one in the replacing expression produces extra \\ $text =~ s/aNY/\\V{aN}\\Q{}/g; - $text =~ s/(?<=A\\H{}|\\H{a})aN/\\V{aN}/g; + $text =~ s/(?<=A\\H\{\}|\\H\{a\})aN/\\V{aN}/g; $text =~ s/(?<=T)aN/\\V{aN}/g; $text =~ s/(?<!{)aNA?/\\V{aN}\\L{}/g;


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.