diff options
Diffstat (limited to 'lib/Unicode/UCD.pm')
-rw-r--r-- | lib/Unicode/UCD.pm | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/Unicode/UCD.pm b/lib/Unicode/UCD.pm index b15b9274cc..30acd503b8 100644 --- a/lib/Unicode/UCD.pm +++ b/lib/Unicode/UCD.pm @@ -530,13 +530,12 @@ sub charblock { my $code = _getcode($arg); if (defined $code) { - _search(\@BLOCKS, 0, $#BLOCKS, $code); - } else { - if (exists $BLOCKS{$arg}) { - return dclone $BLOCKS{$arg}; - } else { - return; - } + my $result = _search(\@BLOCKS, 0, $#BLOCKS, $code); + return $result if defined $result; + return 'No_Block'; + } + elsif (exists $BLOCKS{$arg}) { + return dclone $BLOCKS{$arg}; } } |