diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2005-05-28 14:47:47 +0300 |
---|---|---|
committer | Abhijit Menon-Sen <ams@wiw.org> | 2005-05-28 14:40:32 +0000 |
commit | fd328da5cd5bda438c63e4d4afdd0cb9ed13e129 (patch) | |
tree | ac4d02e70cce505b867afe26bf5b0eeacb55ce10 /t/uni | |
parent | 0d4450e2a6d217ce41ef5cf497dd2f935b716f34 (diff) | |
download | perl-fd328da5cd5bda438c63e4d4afdd0cb9ed13e129.tar.gz |
Re: t/uni/class.t has a lot to warn about
Message-Id: <42983033.5050509@gmail.com>
p4raw-id: //depot/perl@24612
Diffstat (limited to 't/uni')
-rw-r--r-- | t/uni/class.t | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/t/uni/class.t b/t/uni/class.t index deb29821b5..4ab06f7910 100644 --- a/t/uni/class.t +++ b/t/uni/class.t @@ -57,14 +57,16 @@ is(($str =~ /(\p{Script=InGreek}+)/)[0], "\x{038B}\x{038C}\x{038D}"); is(($str =~ /(\p{sc:InGreek}+)/)[0], "\x{038B}\x{038C}\x{038D}"); is(($str =~ /(\p{sc=InGreek}+)/)[0], "\x{038B}\x{038C}\x{038D}"); - use File::Spec; my $updir = File::Spec->updir; - # the %utf8::... hashes are already in existence # because utf8_pva.pl was run by utf8_heavy.pl +*utf8::PropertyAlias = *utf8::PropertyAlias; # thwart a warning + +no warnings 'utf8'; # we do not want warnings about surrogates etc + # non-General Category and non-Script while (my ($abbrev, $files) = each %utf8::PVA_abbr_map) { my $prop_name = $utf8::PropertyAlias{$abbrev}; @@ -77,7 +79,7 @@ while (my ($abbrev, $files) = each %utf8::PVA_abbr_map) { ); next unless -e $filename; - my ($h1, $h2) = map hex, split /\t/, (do $filename); + my ($h1, $h2) = map hex, (split(/\t/, (do $filename), 3))[0,1]; my $str = join "", map chr, $h1 .. (($h2 || $h1) + 1); for my $p ($prop_name, $abbrev) { @@ -97,7 +99,7 @@ for my $p ('gc', 'sc') { ); next unless -e $filename; - my ($h1, $h2) = map hex, split /\t/, (do $filename); + my ($h1, $h2) = map hex, (split(/\t/, (do $filename), 3))[0,1]; my $str = join "", map chr, $h1 .. (($h2 || $h1) + 1); for my $x ($p, { gc => 'General Category', sc => 'Script' }->{$p}) { @@ -127,7 +129,7 @@ SKIP: my $dirname = File::Spec->catdir($updir => lib => unicore => lib => gc_sc); opendir D, $dirname or die $!; - @files{readdir D} = (); + @files{readdir(D)} = (); closedir D; for (keys %utf8::PA_reverse) { @@ -136,7 +138,7 @@ SKIP: my $filename = File::Spec->catfile($dirname, $leafname); - my ($h1, $h2) = map hex, split /\t/, (do $filename); + my ($h1, $h2) = map hex, (split(/\t/, (do $filename), 3))[0,1]; my $str = join "", map chr, $h1 .. (($h2 || $h1) + 1); for my $x ('gc', 'General Category') { @@ -158,7 +160,7 @@ for (grep $utf8::Canonical{$_} =~ /^In/, keys %utf8::Canonical) { ); next unless -e $filename; - my ($h1, $h2) = map hex, split /\t/, (do $filename); + my ($h1, $h2) = map hex, (split(/\t/, (do $filename), 3))[0,1]; my $str = join "", map chr, $h1 .. (($h2 || $h1) + 1); my $blk = $_; |