This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regen/unicode_constants.pl: Fix to work under skip_if_undef
authorKarl Williamson <khw@cpan.org>
Wed, 25 Mar 2015 17:23:36 +0000 (11:23 -0600)
committerKarl Williamson <khw@cpan.org>
Wed, 29 Jul 2015 04:15:51 +0000 (22:15 -0600)
This input flag was not being properly handled.

regen/unicode_constants.pl

index 9cbaf52..38ee018 100644 (file)
@@ -68,13 +68,13 @@ foreach my $charset (get_supported_code_pages()) {
         my $name;
         my $cp;
         my $U_cp;   # code point in Unicode (not-native) terms
-        my $undef_ok = $desired_name || $flag =~ /skip_if_undef/;
 
         if ($name_or_cp =~ /^U\+(.*)/) {
             $U_cp = hex $1;
             $name = charnames::viacode($name_or_cp);
             if (! defined $name) {
-                die "Unknown code point '$name_or_cp' at line $.: $_\n" unless $undef_ok;
+                next if $flag =~ /skip_if_undef/;
+                die "Unknown code point '$name_or_cp' at line $.: $_\n" unless $desired_name;
                 $name = "";
             }
         }