summaryrefslogtreecommitdiff
path: root/pod/perlmodlib.PL
diff options
context:
space:
mode:
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;
}