eval q{ $a ~= tr/a/b/; };
ok 1;
SKIP: {
+ no warnings "deprecated";
skip "no encoding", 1 unless eval { require encoding; 1 };
eval q{ use encoding "utf8"; $a ~= tr/a/b/; };
ok 1;
'IsPunct disagrees with [:punct:] outside ASCII');
my @isPunctLatin1 = eval q {
+ no warnings 'deprecated';
use encoding 'latin1';
grep {/[[:punct:]]/ != /\p{IsPunct}/} map {chr} 0x80 .. 0xff;
};
use strict;
plan (tests => 8);
+no warnings 'deprecated';
use encoding 'johab';
ok(chr(0x7f) eq "\x7f");
plan tests => 72;
+no warnings 'deprecated';
use encoding "greek"; # iso 8859-7
# U+0391, \xC1, \301, GREEK CAPITAL LETTER ALPHA
plan tests => 94;
+no warnings 'deprecated';
use encoding "latin2"; # iso 8859-2
# U+00C1, \xC1, \301, LATIN CAPITAL LETTER A WITH ACUTE
use strict;
plan(tests => 6);
+no warnings 'deprecated';
use encoding 'iso-2022-jp';
my @hiragana = map {chr} ord("\e$B$!\e(B")..ord("\e$B$s\e(B");
use strict;
plan(tests => 6);
+no warnings 'deprecated';
use encoding 'euc-jp';
my @hiragana = map {chr} ord("¤¡")..ord("¤ó");
use strict;
plan(tests => 6);
+no warnings 'deprecated';
use encoding 'shiftjis';
my @hiragana = map {chr} ord("")..ord("ñ");
use strict;
plan(tests => 8);
+no warnings 'deprecated';
use encoding 'utf8';
my @hiragana = map {chr} ord("ぁ")..ord("ん");