From: Lukas Mai Date: Sun, 10 Aug 2003 22:37:41 +0000 (+0000) Subject: [perl #23273] warnings in Unicode::UCD X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c5a29f4004592b2ad76f103411af81e53655e50a;p=p5sagit%2Fp5-mst-13.2.git [perl #23273] warnings in Unicode::UCD From: Lukas Mai (via RT) Message-ID: p4raw-id: //depot/perl@20609 --- diff --git a/lib/Unicode/UCD.pm b/lib/Unicode/UCD.pm index a723869..66734c3 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 c134935..067172d 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