Skip test for changing TZ if running in a pseudo-fork (on Win32)
[p5sagit/p5-mst-13.2.git] / pod / perlmodlib.PL
index 59715df..39e9613 100644 (file)
@@ -2,7 +2,7 @@
 
 $ENV{LC_ALL} = 'C';
 
-open (OUT, ">perlmodlib.tmp") or die $!;
+open (OUT, ">perlmodlib.pod") or die $!;
 my (@pragma, @mod, @MANIFEST);
 
 open (MANIFEST, "../MANIFEST") or die $!;
@@ -10,34 +10,57 @@ open (MANIFEST, "../MANIFEST") or die $!;
 push @MANIFEST, 'lib/Config.pod', 'lib/Errno.pm', 'lib/lib.pm',
     'lib/DynaLoader.pm', 'lib/XSLoader.pm';
 
+# If run in a clean source tree, these will be missing because they are
+# generated by the build.
+my %generated = (
+    'encoding' => 'Allows you to write your script in non-ascii or non-utf8',
+    'lib' => 'Manipulate @INC at compile time',
+    'ops' => 'Restrict unsafe operations when compiling',
+    'Config' => 'Access Perl configuration information',
+    'DynaLoader' => 'Dynamically load C libraries into Perl code',
+    'Errno' => 'System errno constants',
+    'O' => 'Generic interface to Perl Compiler backends',
+    'Safe' => 'Compile and execute code in restricted compartments',
+    'XSLoader' => 'Dynamically load C libraries into Perl code',
+);
+
+# If run in a clean source tree, these should not be reported.
+# These are considered 'modules' by this script, but they really are not.
+my %suppressed = map {$_ => 1} qw(
+    B::O
+    Encode::encoding
+    Opcode::Safe
+    Opcode::ops
+);
+
 for (@MANIFEST) {
-     my $filename;
-     next unless s|^lib/|| or m|^ext/|;
-     my ($origfilename) = ($filename) = m|^(\S+)|;
-     $filename =~ s|^[^/]+/|| if $filename =~ s|^ext/||;
-     next unless $filename =~ m!\.p(m|od)$!;
-     unless (open (MOD, "../lib/$filename")) {
-       unless (open (MOD, "../$origfilename")) {
-           warn "Couldn't open ../$origfilename: $!";
-           next;
-       }
-       $filename = $origfilename;
-     }
+    my $filename;
+    next unless s|^lib/|| or m|^ext/|;
+    my ($origfilename) = ($filename) = m|^(\S+)|;
+    $filename =~ s|^[^/]+/|| if $filename =~ s|^ext/||;
+    next unless $filename =~ m!\.p(m|od)$!;
+    unless (open (MOD, "../lib/$filename")) {
+        unless (open (MOD, "../$origfilename")) {
+            warn "Couldn't open ../$origfilename: $!";
+            next;
+        }
+        $filename = $origfilename;
+    }
 
 
      my ($name, $thing);
      my $foundit=0;
      {
-        local $/="";
-        while (<MOD>) {
-            next unless /^=head1 NAME/;
-            $foundit++;
-            last;
-        }
+         local $/="";
+         while (<MOD>) {
+             next unless /^=head1 NAME/;
+             $foundit++;
+             last;
+         }
      }
      unless ($foundit) {
-        warn "$filename missing =head1 NAME (okay if there is respective .pod)\n";
-        next;
+         warn "$filename missing =head1 NAME (OK if respective .pod exists)\n";
+         next;
      }
      my $title = <MOD>;
      chomp($title);
@@ -49,14 +72,18 @@ for (@MANIFEST) {
      $perlname =~ s!\b(\w+)/\1\b!$1!;
      $perlname =~ s!/!::!g;
 
+     # modules with non standard locations
+     $perlname =~ s{Base64::QuotedPrint}{QuotedPrint};
+
      ($name, $thing) = split / --? /, $title, 2;
 
      unless ($name and $thing) {
-        warn "$filename missing name\n"  unless $name;
-        warn "$filename missing thing\n" unless $thing;
-        next;
+         warn "$filename missing name\n"  unless $name;
+         warn "$filename missing thing\n" unless $thing;
+         next;
      }
 
+     next if $suppressed{$perlname};
 
      $thing =~ s/^perl pragma to //i;
      $thing = ucfirst($thing);
@@ -67,6 +94,17 @@ for (@MANIFEST) {
      } else {
           push @pragma, $title;
      }
+
+     # if we find a generated one via the MANIFEST, no need to add later.
+     delete $generated{$perlname};
+}
+while (my ($name,$desc) = each %generated) {
+    my $title = "=item $name\n\n$desc\n\n";
+    if ($name =~ /[A-Z]/) {
+        push @mod, $title;
+    } else {
+        push @pragma, $title;
+    }
 }
 
 print OUT <<'EOF';
@@ -342,10 +380,10 @@ You should try to choose one close to you.
 
                       ftp://ftp.u-aizu.ac.jp/pub/CPAN
                       ftp://ftp.kddlabs.co.jp/CPAN/
-                      http://mirror.nucba.ac.jp/mirror/Perl/
-                      ftp://mirror.nucba.ac.jp/mirror/Perl/
                       ftp://ftp.ayamura.org/pub/CPAN/
                       ftp://ftp.jaist.ac.jp/pub/lang/perl/CPAN/
+                      http://ftp.cpan.jp/
+                      ftp://ftp.cpan.jp/CPAN/
                       ftp://ftp.dti.ad.jp/pub/lang/CPAN/
                       ftp://ftp.ring.gr.jp/pub/lang/perl/CPAN/
 
@@ -358,7 +396,7 @@ You should try to choose one close to you.
 =item Russian Federation
 
                       http://cpan.tomsk.ru
-                      ftp://cpan.tomsk.ru/pub/CPAN
+                      ftp://cpan.tomsk.ru/
 
 =item Saudi Arabia
 
@@ -390,6 +428,7 @@ You should try to choose one close to you.
                       ftp://ftp1.sinica.edu.tw/pub1/perl/CPAN/
                       http://ftp.tku.edu.tw/pub/CPAN/
                       ftp://ftp.tku.edu.tw/pub/CPAN/
+
 =item Thailand
 
                       ftp://ftp.loxinfo.co.th/pub/cpan/
@@ -414,6 +453,8 @@ You should try to choose one close to you.
 
 =item Austria
 
+                      http://cpan.inode.at/
+                      ftp://cpan.inode.at
                       ftp://ftp.tuwien.ac.at/pub/CPAN/
 
 =item Belgium
@@ -424,6 +465,10 @@ You should try to choose one close to you.
                       ftp://ftp.cpan.skynet.be/pub/CPAN
                       ftp://ftp.kulnet.kuleuven.ac.be/pub/mirror/CPAN/
 
+=item Bosnia and Herzegovina
+
+                      http://cpan.blic.net/
+
 =item Bulgaria
 
                       http://cpan.online.bg
@@ -440,7 +485,6 @@ You should try to choose one close to you.
 
 =item Czech Republic
 
-                      http://ftp.fi.muni.cz/pub/CPAN/
                       ftp://ftp.fi.muni.cz/pub/CPAN/
                       ftp://sunsite.mff.cuni.cz/MIRRORS/ftp.funet.fi/pub/languages/perl/CPAN/
 
@@ -479,7 +523,6 @@ You should try to choose one close to you.
                       ftp://ftp.crihan.fr/mirrors/ftp.cpan.org/
                       http://ftp.u-strasbg.fr/CPAN
                       ftp://ftp.u-strasbg.fr/CPAN
-                      http://cpan.cict.fr/
                       ftp://cpan.cict.fr/pub/CPAN/
                       ftp://ftp.uvsq.fr/pub/perl/CPAN/
 
@@ -568,6 +611,7 @@ You should try to choose one close to you.
 
 =item Poland
 
+                      ftp://ftp.mega.net.pl/CPAN
                       ftp://ftp.man.torun.pl/pub/doc/CPAN/
                       ftp://sunsite.icm.edu.pl/pub/CPAN/
 
@@ -589,6 +633,7 @@ You should try to choose one close to you.
 
                       ftp://ftp.bio-net.ro/pub/CPAN
                       ftp://ftp.kappa.ro/pub/mirrors/ftp.perl.org/pub/CPAN/
+                      ftp://ftp.lug.ro/CPAN
                       ftp://ftp.roedu.net/pub/CPAN/
                       ftp://ftp.dntis.ro/pub/cpan/
                       ftp://ftp.iasi.roedu.net/pub/mirrors/ftp.cpan.org/
@@ -604,6 +649,7 @@ You should try to choose one close to you.
                       http://cpan.rinet.ru/
                       ftp://cpan.rinet.ru/pub/mirror/CPAN/
                       ftp://ftp.aha.ru/pub/CPAN/
+                      ftp://ftp.corbina.ru/pub/CPAN/
                       http://cpan.sai.msu.ru/
                       ftp://ftp.sai.msu.su/pub/lang/perl/CPAN/
 
@@ -619,7 +665,7 @@ You should try to choose one close to you.
 
                       http://cpan.imasd.elmundo.es/
                       ftp://ftp.rediris.es/mirror/CPAN/
-                      ftp.ri.telefonica-data.net
+                      ftp://ftp.ri.telefonica-data.net/CPAN
                       ftp://ftp.etse.urv.es/pub/perl/
 
 =item Sweden
@@ -632,6 +678,8 @@ You should try to choose one close to you.
 
 =item Switzerland
 
+                      http://cpan.mirror.solnet.ch/
+                      ftp://ftp.solnet.ch/mirror/CPAN/
                       ftp://ftp.danyk.ch/CPAN/
                       ftp://sunsite.cnlab-switch.ch/mirror/CPAN/
 
@@ -657,6 +705,8 @@ You should try to choose one close to you.
                       ftp://cpan.teleglobe.net/pub/CPAN
                       http://cpan.mirror.anlx.net/
                       ftp://ftp.mirror.anlx.net/CPAN/
+                      http://cpan.etla.org/
+                      ftp://cpan.etla.org/pub/CPAN
                       ftp://ftp.demon.co.uk/pub/CPAN/
                       http://cpan.m.flirble.org/
                       ftp://ftp.flirble.org/pub/languages/perl/CPAN/
@@ -674,7 +724,7 @@ You should try to choose one close to you.
 
 =item Canada
 
-=over 4
+=over 8
 
 =item Alberta
 
@@ -694,20 +744,20 @@ You should try to choose one close to you.
 
                       ftp://ftp.nrc.ca/pub/CPAN/
 
+=back
+
 =item Mexico
 
                       http://cpan.azc.uam.mx
                       ftp://cpan.azc.uam.mx/mirrors/CPAN
-                      http://cpan.unam.mx/
-                      ftp://cpan.unam.mx/pub/CPAN
+                      http://www.cpan.unam.mx/
+                      ftp://ftp.unam.mx/pub/CPAN
                       http://www.msg.com.mx/CPAN/
                       ftp://ftp.msg.com.mx/pub/CPAN/
 
-=back
-
 =item United States
 
-=over 4
+=over 8
 
 =item Alabama
 
@@ -719,17 +769,23 @@ You should try to choose one close to you.
                       http://cpan.develooper.com/
                       http://www.cpan.org/
                       ftp://cpan.valueclick.com/pub/CPAN/
+                      http://www.mednor.net/ftp/pub/mirrors/CPAN/
+                      ftp://ftp.mednor.net/pub/mirrors/CPAN/
                       http://mirrors.gossamer-threads.com/CPAN
                       ftp://cpan.nas.nasa.gov/pub/perl/CPAN/
                       http://mirrors.kernel.org/cpan/
                       ftp://mirrors.kernel.org/pub/CPAN
+                      http://cpan-sj.viaverio.com/
+                      ftp://cpan-sj.viaverio.com/pub/CPAN/
                       http://cpan.digisle.net/
                       ftp://cpan.digisle.net/pub/CPAN
                       http://www.perl.com/CPAN/
+                      http://www.uberlan.net/CPAN
 
 =item Colorado
 
                       ftp://ftp.cs.colorado.edu/pub/perl/CPAN/
+                      http://cpan.four10.com
 
 =item Delaware
 
@@ -747,11 +803,6 @@ You should try to choose one close to you.
                       ftp://mirror.csit.fsu.edu/pub/CPAN/
                       http://cpan.mirrors.nks.net/
 
-=item Illinois
-
-                      http://uiarchive.uiuc.edu/mirrors/ftp/cpan.cse.msu.edu/
-                      ftp://uiarchive.uiuc.edu/mirrors/ftp/cpan.cse.msu.edu/
-
 =item Indiana
 
                       ftp://ftp.uwsg.iu.edu/pub/perl/CPAN/
@@ -780,6 +831,8 @@ You should try to choose one close to you.
 =item Michigan
 
                       ftp://cpan.cse.msu.edu/
+                      http://cpan.calvin.edu/pub/CPAN
+                      ftp://cpan.calvin.edu/pub/CPAN
 
 =item Nevada
 
@@ -806,6 +859,8 @@ You should try to choose one close to you.
 
 =item North Carolina
 
+                      http://www.ibiblio.org/pub/languages/perl/CPAN
+                      ftp://ftp.ibiblio.org/pub/languages/perl/CPAN
                       ftp://ftp.duke.edu/pub/perl/
                       ftp://ftp.ncsu.edu/pub/mirror/CPAN/
 
@@ -844,6 +899,8 @@ You should try to choose one close to you.
 
 =item Virginia
 
+                      http://cpan-du.viaverio.com/
+                      ftp://cpan-du.viaverio.com/pub/CPAN/
                       http://mirrors.rcn.net/pub/lang/CPAN/
                       ftp://mirrors.rcn.net/pub/lang/CPAN/
                       http://perl.secsup.org/
@@ -862,6 +919,8 @@ You should try to choose one close to you.
 
                       http://mirror.sit.wisc.edu/pub/CPAN/
                       ftp://mirror.sit.wisc.edu/pub/CPAN/
+                      http://mirror.aphix.com/CPAN
+                      ftp://mirror.aphix.com/pub/CPAN
 
 =back
 
@@ -877,6 +936,7 @@ You should try to choose one close to you.
                       ftp://ftp.planetmirror.com/pub/CPAN/
                       ftp://mirror.aarnet.edu.au/pub/perl/CPAN/
                       ftp://cpan.topend.com.au/pub/CPAN/
+                      http://cpan.mirrors.ilisys.com.au
 
 =item New Zealand
 
@@ -915,39 +975,45 @@ You should try to choose one close to you.
 
 =head2 RSYNC Mirrors
 
-                     ftp.shellhung.org::CPAN
-                     ftp.cbn.net.id::CPAN
-                     ftp.iglu.org.il::CPAN
-                     ftp.kddlabs.co.jp::cpan
-                     ftp.ayamura.org::pub/CPAN/
-                     mirror.leafbug.org::CPAN
-                     rsync.en.com.sg::CPAN
-                     mirror.averse.net::cpan
-                     rsync.oss.eznetsols.org
-                     ftp.kr.FreeBSD.org::CPAN
-                     cpan.cdpa.nsysu.edu.tw::CPAN
-                     rsync.nic.funet.fi::CPAN
-                     ftp.u-paris10.fr::CPAN
-                     mir1.ovh.net::CPAN
-                     ftp.crihan.fr::CPAN
-                     ftp.gwdg.de::FTP/languages/perl/CPAN/
-                     ftp.leo.org::CPAN
-                     ftp.heanet.ie/mirrors/ftp.perl.org/pub/CPAN
-                     gusp.dyndns.org::cpan
-                     cpan.teleglobe.net::CPAN
-                     rsync://rsync.mirror.anlx.net::CPAN
-                     theoryx5.uwinnipeg.ca::CPAN
-                     ftp.sedl.org::cpan
-                     archive.progeny.com::CPAN
-                     slugsite.louisville.edu::CPAN
-                     cpan.teleglobe.net::CPAN
-                     ftp.lug.udel.edu::cpan
-                     mirrors.kernel.org::mirrors/CPAN
-                     mirrors.phenominet.com::CPAN
-                     mirror.csit.fsu.edu::CPAN
-                     csociety-ftp.ecn.purdue.edu::CPAN
-                     aniani.ifa.hawaii.edu::CPAN
-                     www.linux.org.ar::cpan
+                      www.linux.org.ar::cpan
+                      theoryx5.uwinnipeg.ca::CPAN
+                      ftp.shellhung.org::CPAN
+                      rsync.nic.funet.fi::CPAN
+                      ftp.u-paris10.fr::CPAN
+                      mir1.ovh.net::CPAN
+                      rsync://ftp.crihan.fr::CPAN
+                      ftp.gwdg.de::FTP/languages/perl/CPAN/
+                      ftp.leo.org::CPAN
+                      ftp.cbn.net.id::CPAN
+                      rsync://ftp.heanet.ie/mirrors/ftp.perl.org/pub/CPAN
+                      ftp.iglu.org.il::CPAN
+                      gusp.dyndns.org::cpan
+                      ftp.kddlabs.co.jp::cpan
+                      ftp.ayamura.org::pub/CPAN/
+                      mirror.leafbug.org::CPAN
+                      rsync.en.com.sg::CPAN
+                      mirror.averse.net::cpan
+                      rsync.oss.eznetsols.org
+                      ftp.kr.FreeBSD.org::CPAN
+                      ftp.solnet.ch::CPAN
+                      cpan.cdpa.nsysu.edu.tw::CPAN
+                      cpan.teleglobe.net::CPAN
+                      rsync://rsync.mirror.anlx.net::CPAN
+                      ftp.sedl.org::cpan
+                      ibiblio.org::CPAN
+                      cpan-du.viaverio.com::CPAN
+                      aniani.ifa.hawaii.edu::CPAN
+                      archive.progeny.com::CPAN
+                      rsync://slugsite.louisville.edu::CPAN
+                      mirror.aphix.com::CPAN
+                      cpan.teleglobe.net::CPAN
+                      ftp.lug.udel.edu::cpan
+                      mirrors.kernel.org::mirrors/CPAN
+                      mirrors.phenominet.com::CPAN
+                      cpan.pair.com::CPAN
+                      cpan-sj.viaverio.com::CPAN
+                      mirror.csit.fsu.edu::CPAN
+                      csociety-ftp.ecn.purdue.edu::CPAN
 
 For an up-to-date listing of CPAN sites,
 see http://www.cpan.org/SITES or ftp://www.cpan.org/SITES .
@@ -1042,8 +1108,8 @@ the module after __END__ either using AutoSplit or by saying:
 Does your module pass the 'empty subclass' test? If you say
 C<@SUBCLASS::ISA = qw(YOURCLASS);> your applications should be able
 to use SUBCLASS in exactly the same way as YOURCLASS.  For example,
-does your application still work if you change:  C<$obj = new YOURCLASS;>
-into: C<$obj = new SUBCLASS;> ?
+does your application still work if you change:  C<< $obj = YOURCLASS->new(); >>
+into: C<< $obj = SUBCLASS->new(); >> ?
 
 Avoid keeping any state information in your packages. It makes it
 difficult for multiple other packages to use yours. Keep state
@@ -1433,5 +1499,5 @@ you're redefining the world and willing to take the consequences.
 EOF
 
 close MANIFEST or warn "$0: failed to close MANIFEST (../MANIFEST): $!";
-close OUT      or warn "$0: failed to close OUT (perlmodlib.tmp): $!";
+close OUT      or warn "$0: failed to close OUT (perlmodlib.pod): $!";