This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
charnames.pm: Change variable's name
authorKarl Williamson <khw@khw-desktop.(none)>
Tue, 13 Jul 2010 19:09:14 +0000 (13:09 -0600)
committerKarl Williamson <khw@khw-desktop.(none)>
Tue, 13 Jul 2010 23:15:14 +0000 (17:15 -0600)
It makes more sense to me in light of patches coming up.

lib/charnames.pm

index d3caff9..426775d 100644 (file)
@@ -565,16 +565,16 @@ sub lookup_name ($;$) {
       ## end of the name as we find it.
 
       ## If :full, look for the name exactly; runtime implies full
-      my $found_full = 0;  # Tells us if can cache the result
+      my $found_full_in_table = 0;  # Tells us if can cache the result
       if ($^H{charnames_full}) {
         if ($txt =~ /\t\t\Q$name\E$/m) {
           @off = ($-[0] + 2, $+[0]);    # The 2 is for the 2 tabs
-          $found_full = 1;
+          $found_full_in_table = 1;
         }
       }
 
       # If we didn't get it above keep looking
-      if (! $found_full) {
+      if (! $found_full_in_table) {
 
         # If :short is allowed, look for the short name, which is like
         # "greek:Sigma"
@@ -628,7 +628,7 @@ sub lookup_name ($;$) {
 
       # Cache the input so as to not have to search the large table
       # again, but only if it came from the one search that we cache.
-      $full_names_cache{$name} = $ord if $found_full;
+      $full_names_cache{$name} = $ord if $found_full_in_table;
     }
   }
 
@@ -1174,10 +1174,6 @@ to C<perl5-porters@perl.org> to comment on this proposal.  If S<C<use
 bytes>> is in effect when a chr is returned, and if that chr won't fit
 into a byte, C<undef> is returned instead.
 
-All the Hangul syllable characters are treated as having no names, as
-are almost all the CJK Unicode characters that have their code points as
-part of their names.
-
 Names must be ASCII characters only, which means that you are out of luck if
 you want to create aliases in a language where some or all the characters of
 the desired aliases are non-ASCII.