X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Futf8_heavy.pl;h=41a0662fd82db6962e3461a5a0ddb9e60bc52ca1;hb=163ba113b958ebef4215df1e1b04445b4a85504f;hp=c7bf527b1f8bc86e987b27ec00a2c7832bf3f6bd;hpb=c49d5ed730376407060cbf826eab2369ab99bf61;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/utf8_heavy.pl b/lib/utf8_heavy.pl index c7bf527..41a0662 100644 --- a/lib/utf8_heavy.pl +++ b/lib/utf8_heavy.pl @@ -137,10 +137,12 @@ sub SWASHNEW { print STDERR "canonical = $canonical\n" if DEBUG; require "unicore/Canonical.pl"; + { no warnings "uninitialized"; if (my $base = ($utf8::Canonical{$canonical} || $utf8::Canonical{ lc $utf8::PropertyAlias{$canonical} })) { $file = "unicore/lib/gc_sc/$base.pl"; last GETFILE; } + } ## ## See if it's a user-level "To". @@ -195,6 +197,8 @@ sub SWASHNEW { return $found; } + local $@; + local $!; $list = do $file; die $@ if $@; } @@ -213,7 +217,7 @@ sub SWASHNEW { $list = join '', map { $_->[1] } sort { $a->[0] <=> $b->[0] } - map { /^([0-9a-fA-F]+)/; [ hex($1), $_ ] } + map { /^([0-9a-fA-F]+)/; [ CORE::hex($1), $_ ] } grep { /^([0-9a-fA-F]+)/ and not $seen{$1}++ } @tmp; # XXX doesn't do ranges right } @@ -225,9 +229,9 @@ sub SWASHNEW { if ($minbits != 1 && $minbits < 32) { # not binary property my $top = 0; while ($list =~ /^([0-9a-fA-F]+)(?:[\t]([0-9a-fA-F]+)?)(?:[ \t]([0-9a-fA-F]+))?/mg) { - my $min = hex $1; - my $max = defined $2 ? hex $2 : $min; - my $val = defined $3 ? hex $3 : 0; + my $min = CORE::hex $1; + my $max = defined $2 ? CORE::hex $2 : $min; + my $val = defined $3 ? CORE::hex $3 : 0; $val += $max - $min if defined $3; $top = $val if $val > $top; }