summaryrefslogtreecommitdiff
path: root/lib/utf8_heavy.pl
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-11-05 10:34:01 -0600
committerKarl Williamson <public@khwilliamson.com>2011-11-08 08:09:34 -0700
commit814687adcd5f07676bb5d5f635794cb35a47c895 (patch)
treec11180e5aaa41e2c1f10f65668bedc713d4d05e1 /lib/utf8_heavy.pl
parent89cf10ccc096bcaa44576e1297905bd50f2915c7 (diff)
downloadperl-814687adcd5f07676bb5d5f635794cb35a47c895.tar.gz
utf8_heavy: Reorder 2 if's
This saves a little redundant code, and will be useful in future commits
Diffstat (limited to 'lib/utf8_heavy.pl')
-rw-r--r--lib/utf8_heavy.pl9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/utf8_heavy.pl b/lib/utf8_heavy.pl
index 777e11a137..0bb1cdda38 100644
--- a/lib/utf8_heavy.pl
+++ b/lib/utf8_heavy.pl
@@ -422,17 +422,14 @@ sub _loose_name ($) {
## The user-level way to access ToDigit() and ToFold()
## is to use Unicode::UCD.
##
- if ($type =~ /^To(Digit|Fold|Lower|Title|Upper)$/) {
- # Fail if wanting a binary property, as these aren't.
- if ($minbits == 1) {
- pop @recursed if @recursed;
- return $type;
- }
+ if ($minbits != 1) { # Only check if caller wants non-binary
+ if ($type =~ /^To(Digit|Fold|Lower|Title|Upper)$/) {
$file = "$unicore_dir/To/$1.pl";
## would like to test to see if $file actually exists....
last GETFILE;
}
+ }
##
## If we reach this line, it's because we couldn't figure