This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Ensure string table counts are balanced. (Was not true in op/pack.t)
[perl5.git] / autodoc.pl
index 5e7b3c2..4c5c60f 100644 (file)
@@ -45,6 +45,7 @@ sub walk_table (&@) {
            $_ .= <IN>;
            chomp;
        }
+       s/\s+$//;
        my @args;
        if (/^\s*(#|$)/) {
            @args = $_;
@@ -52,6 +53,7 @@ sub walk_table (&@) {
        else {
            @args = split /\s*\|\s*/, $_;
        }
+       s/\bNN\b\s+// for @args;
        print $F $function->(@args);
     }
     print $F $trailer if $trailer;
@@ -219,7 +221,8 @@ my $key;
 for $key (sort { uc($a) cmp uc($b) || $a cmp $b } keys %apidocs) {
     my $section = $apidocs{$key}; 
     print DOC "\n=head1 $key\n\n=over 8\n\n";
-    for my $key (sort { uc($a) cmp uc($b); } keys %$section) {
+    # Again, fallback for determinacy
+    for my $key (sort { uc($a) cmp uc($b) || $a cmp $b } keys %$section) {
         docout(\*DOC, $key, $section->{$key});
     }
     print DOC "\n=back\n";