diff options
author | Lukas Mai <unknown> | 2003-08-10 22:37:41 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-11 04:28:29 +0000 |
commit | c5a29f4004592b2ad76f103411af81e53655e50a (patch) | |
tree | f1f75dd473a29d54fa38378e107f255da3cf22c3 /lib/Unicode | |
parent | cd28123a2c77a86bd3079d0bff9f940c7270fdb6 (diff) | |
download | perl-c5a29f4004592b2ad76f103411af81e53655e50a.tar.gz |
[perl #23273] warnings in Unicode::UCD
From: Lukas Mai (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-23273-62473.18.6967347513833@rt.perl.org>
p4raw-id: //depot/perl@20609
Diffstat (limited to 'lib/Unicode')
-rw-r--r-- | lib/Unicode/UCD.pm | 1 | ||||
-rw-r--r-- | lib/Unicode/UCD.t | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/Unicode/UCD.pm b/lib/Unicode/UCD.pm index a7238694b7..66734c3dc1 100644 --- a/lib/Unicode/UCD.pm +++ b/lib/Unicode/UCD.pm @@ -211,6 +211,7 @@ sub charinfo { use Search::Dict 1.02; if (look($UNICODEFH, "$hexk;", { xfrm => sub { $_[0] =~ /^([^;]+);(.+)/; sprintf "%06X;$2", hex($1) } } ) >= 0) { my $line = <$UNICODEFH>; + return unless defined $line; chomp $line; my %prop; @prop{qw( diff --git a/lib/Unicode/UCD.t b/lib/Unicode/UCD.t index c134935c3b..067172d1b5 100644 --- a/lib/Unicode/UCD.t +++ b/lib/Unicode/UCD.t @@ -12,7 +12,7 @@ use strict; use Unicode::UCD; use Test::More; -BEGIN { plan tests => 178 }; +BEGIN { plan tests => 179 }; use Unicode::UCD 'charinfo'; @@ -309,3 +309,6 @@ is(Unicode::UCD::_getcode('U+123x'), undef, "_getcode(x123)"); is(@$r2, $n1, "modifying results should not mess up internal caches"); } +{ + is(charinfo(0xdeadbeef), undef, "[perl #23273] warnings in Unicode::UCD"); +}
\ No newline at end of file |