This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
change manisort to produce a more intuitive order
[perl5.git] / Porting / pod_rules.pl
index 0d837bf..af5550e 100644 (file)
@@ -140,14 +140,15 @@ sub do_manifest {
     my @manifest =
         grep {! m!^pod/[^. \t]+\.pod.*!}
             grep {! m!^README\.(\S+)! || $state->{ignore}{$1}} split "\n", $prev;
-    join "\n", (
-                # Dictionary order - fold and handle non-word chars as nothing
-                map  { $_->[0] }
-                sort { $a->[1] cmp $b->[1] || $a->[0] cmp $b->[0] }
-                map  { my $f = lc $_; $f =~ s/[^a-z0-9\s]//g; [ $_, $f ] }
-                @manifest,
-                &generate_manifest_pod(),
-                &generate_manifest_readme()), '';
+    # NOTE - the sort code here is shared with Porting/manisort currently.
+    # If you change one, change the other. Or refactor them. :-)
+    join "\n",  sort_manifest(
+                    @manifest,
+                    &generate_manifest_pod(),
+                    &generate_manifest_readme()
+                ),
+                '', # elegant way to add a newline to the end
+    ;
 }
 
 sub do_nmake {