This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
lib/utf8_heavy.pl: Don't return empty under miniperl
authorKarl Williamson <khw@cpan.org>
Mon, 1 Sep 2014 18:11:48 +0000 (12:11 -0600)
committerKarl Williamson <khw@cpan.org>
Mon, 1 Sep 2014 18:17:31 +0000 (12:17 -0600)
When run under miniperl before mktables has generated its tables , this
program would return empty for Unicode properties instead of an error
condition.  The problem was that when it detected this, it just
continued on to the rest of the code which assumed it had found an empty
table, instead of no table at all.  The solution is to return an e error
when one is detected.

lib/utf8_heavy.pl

index 3cd8e83..43f3399 100644 (file)
@@ -175,7 +175,11 @@ sub _loose_name ($) {
                 }
                 if (miniperl) {
                     eval "require '$unicore_dir/Heavy.pl'";
-                    last GETFILE if $@;
+                    if ($@) {
+                        print STDERR __LINE__, ": '$@'\n" if DEBUG;
+                        pop @recursed if @recursed;
+                        return $type;
+                    }
                 }
                 else {
                     require "$unicore_dir/Heavy.pl";