Add CJK READMEs from Autrijus Tang, Dan Kogai, and
[p5sagit/p5-mst-13.2.git] / pod / buildtoc.PL
index 54853d3..413afd8 100644 (file)
@@ -59,8 +59,50 @@ if (-d "pod") {
   die "$0: failed to chdir('pod'): $!\n" unless chdir("pod");
 }
 
-@pods = qw(
+@ARCHPODS = qw(
+    perlaix    
+    perlapollo
+    perlamiga          
+    perlbeos
+    perlbs2000
+    perlce
+    perlcygwin          
+    perldgux             
+    perldos             
+    perlepoc             
+    perlhpux            
+    perlhurd            
+    perlmachten         
+    perlmacos
+    perlmint
+    perlmpeix
+    perlnetware             
+    perlos2             
+    perlos390           
+    perlqnx
+    perlplan9
+    perlsolaris
+    perltru64
+    perluts
+    perlvmesa
+    perlvms             
+    perlvos             
+    perlwin32           
+          );
+
+@CJKPODS = qw(
+    perlcn
+    perljp
+    perlko
+    perltw
+          );
+
+@pods = 
+  (
+    qw(
+
     perl
+    perlintro
     perlfaq
     perltoc
     perlbook
@@ -74,43 +116,53 @@ if (-d "pod") {
     perldsc
     perlrequick
     perlpod
+    perlpodspec
     perlstyle
     perltrap
 
     perlrun
     perldiag
     perllexwarn
+    perldebtut
     perldebug
 
     perlvar
     perllol
     perlopentut
+    perlpacktut
     perlretut
 
-    perlref
     perlre
+    perlref
+
     perlform
-    perllocale
-    perlunicode
+
+    perlboot
+    perltoot
+    perltooc
+    perlobj
+    perlbot
+    perltie
 
     perlipc
     perlfork
     perlnumber
+
     perlthrtut
+    perlothrtut
 
     perlport
-    perlsec
+    perllocale
+    perluniintro
+    perlunicode
+    perlebcdic
 
-    perlboot
-    perltoot
-    perltootc
-    perlobj
-    perlbot
-    perltie
+    perlsec
 
     perlmod
-    perlmodlib
     perlmodinstall
+    perlmodlib
+    perlmodstyle
     perlnewmod
 
     perlfaq1            
@@ -129,6 +181,7 @@ if (-d "pod") {
     perldebguts         
     perlxstut           
     perlxs              
+    perlclib            
     perlguts            
     perlcall            
     perlutil            
@@ -136,43 +189,33 @@ if (-d "pod") {
     perldbmfilter       
     perlapi             
     perlintern          
+    perliol            
     perlapio            
     perltodo            
     perlhack            
 
     perlhist           
     perldelta           
+    perl572delta         
+    perl571delta         
+    perl570delta         
+    perl561delta         
     perl56delta         
     perl5005delta       
     perl5004delta       
 
-    perlamiga          
-    perlcygwin          
-    perldos             
-    perlhpux            
-    perlmachten         
-    perlos2             
-    perlos390           
-    perlposix-bc
-    perlvms             
-    perlwin32           
-         );
+    ),
+
+    @ARCHPODS,
+
+  );
 
-@ARCHPODS = qw(
-    perlamiga          
-    perlcygwin          
-    perldos             
-    perlhpux            
-    perlmachten         
-    perlos2             
-    perlos390           
-    perlposix-bc
-    perlvms             
-    perlwin32           
-          );
 for (@ARCHPODS) { s/$/.pod/ }
 @ARCHPODS{@ARCHPODS} = ();
 
+for (@CJKPODS) { s/$/.pod/ }
+@CJKPODS{@CJKPODS} = ();
+
 for (@pods) { s/$/.pod/ }
 @pods{@pods} = ();
 @PODS{@PODS} = ();
@@ -199,6 +242,11 @@ die "$0: could not find the pod listing of perl.pod\n"
   unless @PERLPODS;
 @PERLPODS{@PERLPODS} = ();
 
+# Delete the CJK because we cannot mix their encodings.
+delete @PERLPODS{@CJKPODS};
+delete @PODS{@CJKPODS};
+delete @pods{@CJKPODS};
+
 # Cross-check against ourselves
 # Cross-check against the MANIFEST
 # Cross-check against the perl.pod
@@ -207,7 +255,7 @@ foreach my $i (sort keys %PODS) {
   warn "$0: $i exists but is unknown by buildtoc\n"
        unless exists $pods{$i};
   warn "$0: $i exists but is unknown by ../MANIFEST\n"
-       if !exists $MANIPODS{$i} && !exists $ARCHPODS{$i};
+       if !exists $MANIPODS{$i} && !exists $ARCHPODS{$i} && !exists $CJKPODS{$i};
   warn "$0: $i exists but is unknown by perl.pod\n"
        unless exists $PERLPODS{$i};
 }
@@ -253,11 +301,12 @@ find \&getpods => qw(../lib ../ext);
 
 sub getpods {
     if (/\.p(od|m)$/) {
-       # Skip .pm files that have corresponding .pod files, and Functions.pm.
-       return if /(.*)\.pm$/ && -f "$1.pod";
        my $file = $File::Find::name;
        return if $file eq '../lib/Pod/Functions.pm'; # Used only by pod itself
-
+        return if $file =~ m!lib/Attribute/Handlers/demo/!;
+       return if $file =~ m!lib/Net/FTP/.+\.pm!; # Hi, Graham! :-)
+        return if $file =~ m!lib/Math/BigInt/t/!;
+       return if $file =~ m!/Devel/PPPort/[Hh]arness|lib/Devel/Harness!i;
        die "tut $name" if $file =~ /TUT/;
        unless (open (F, "< $_\0")) {
            warn "bogus <$file>: $!";
@@ -322,7 +371,7 @@ podset( @modules[ sort { $modname[$a] cmp $modname[$b] } 0 .. $#modules ] );
        Here should be listed all the extra programs' documentation, but they
        don't all have manual pages yet:
 
-       =over
+       =over 4
 
        =item a2p
 
@@ -375,13 +424,13 @@ sub podset {
        }
        if (s/^=head1 (.*)/=item $1/) {
            unhead2();
-           output "=over\n\n" unless $inhead1;
+           output "=over 4\n\n" unless $inhead1;
            $inhead1 = 1;
            output $_; nl(); next;
        }
        if (s/^=head2 (.*)/=item $1/) {
            unitem();
-           output "=over\n\n" unless $inhead2;
+           output "=over 4\n\n" unless $inhead2;
            $inhead2 = 1;
            output $_; nl(); next;
        }
@@ -393,7 +442,7 @@ sub podset {
            s/\s+$//;
            next if /^[\d.]+$/;
            next if $pod eq 'perlmodlib' && /^ftp:/;
-           ##print "=over\n\n" unless $initem;
+           ##print "=over 4\n\n" unless $initem;
            output ", " if $initem;
            $initem = 1;
            s/\.$//;
@@ -468,3 +517,7 @@ sub output ($) {
 
 !NO!SUBS!
 
+close OUT or die "Can't close $file: $!";
+chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
+exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
+chdir $origdir;