This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert "mktables: Remove obsolete sort constraint"
authorKarl Williamson <khw@cpan.org>
Wed, 30 Apr 2014 02:18:42 +0000 (20:18 -0600)
committerKarl Williamson <khw@cpan.org>
Fri, 30 May 2014 00:58:20 +0000 (18:58 -0600)
This reverts commit cf13ddc5efb78ce6d588441978947303e5baf1d8,
and adds a comment as to why.

lib/unicore/mktables

index b5012b7..3c5e060 100644 (file)
@@ -16928,15 +16928,17 @@ sub write_all_tables() {
     # (sort so that if there is an immutable file name, it has precedence, so
     # some other property can't come in and take over its file name.  (We
     # don't care if both defined, as they had better be different anyway.)
-    # We also sort by the property's name.  This is just for repeatability of
-    # the outputs between runs of this program, but does not affect
-    # correctness.
+    # The property named 'Perl' needs to be first (it doesn't have any
+    # immutable file name) because empty properties are defined in terms of
+    # its table named 'All' under the -annotate option.)   We also sort by
+    # the property's name.  This is just for repeatability of the outputs
+    # between runs of this program, but does not affect correctness.
     PROPERTY:
-    foreach my $property (sort { return -1 if defined $a->file;
+    foreach my $property ($perl,
+                          sort { return -1 if defined $a->file;
                                  return 1 if defined $b->file;
                                  return $a->name cmp $b->name;
-                                }
-                                  property_ref('*'))
+                                } grep { $_ != $perl } property_ref('*'))
     {
         my $type = $property->type;