summaryrefslogtreecommitdiff
path: root/pod/perlmodlib.PL
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-06-13 11:34:34 +0100
committerNicholas Clark <nick@ccl4.org>2009-06-13 11:47:10 +0100
commit291c64f4c0f01fdef1479446cf0ba1ec265227d5 (patch)
treeaafc1f3fe1b3327c2904e94097b0ae94aa6b8c3f /pod/perlmodlib.PL
parente8041d9b8361b47aafe5f4dc70a7ae9b018574c2 (diff)
downloadperl-291c64f4c0f01fdef1479446cf0ba1ec265227d5.tar.gz
Make perlmodlib.PL chdir into pod. Add a -q flag to suppress routine warnings.
Diffstat (limited to 'pod/perlmodlib.PL')
-rw-r--r--pod/perlmodlib.PL13
1 files changed, 11 insertions, 2 deletions
diff --git a/pod/perlmodlib.PL b/pod/perlmodlib.PL
index 51828c67f5..0a75208f83 100644
--- a/pod/perlmodlib.PL
+++ b/pod/perlmodlib.PL
@@ -2,9 +2,17 @@
$ENV{LC_ALL} = 'C';
+use FindBin;
+chdir $FindBin::Bin or die "$0: Can't chdir $FindBin::Bin: $!";
+
+my $Quiet = @ARGV && $ARGV[0] eq '-q';
+
open (OUT, ">perlmodlib.pod") or die $!;
my (@pragma, @mod, @MANIFEST);
+# MANIFEST itself is Unix style filenames, so we have to assume that Unix style
+# filenames will work.
+
open (MANIFEST, "../MANIFEST") or die $!;
@MANIFEST = grep !m</(?:t|demo)/>, <MANIFEST>;
push @MANIFEST, 'lib/Config.pod', 'lib/Errno.pm', 'lib/lib.pm',
@@ -55,7 +63,8 @@ for (@MANIFEST) {
}
}
unless ($foundit) {
- warn "$filename missing =head1 NAME (OK if respective .pod exists)\n";
+ warn "$filename missing =head1 NAME (OK if respective .pod exists)\n"
+ unless $Quiet;
next;
}
my $title = <MOD>;
@@ -76,7 +85,7 @@ for (@MANIFEST) {
unless ($name and $thing) {
warn "$filename missing name\n" unless $name;
- warn "$filename missing thing\n" unless $thing;
+ warn "$filename missing thing\n" unless $thing or $Quiet;
next;
}