diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-04-18 12:24:18 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-04-18 12:24:18 +0100 |
commit | d092c3cd1c0e81a16217f2dd8f09f8426e33ebe5 (patch) | |
tree | 942c3f1be065c03c52f933afaf6e9c9a44b2aa72 | |
parent | 344af494c35a9f0f50dab51474b2e7cd806f1b08 (diff) | |
download | perl-d092c3cd1c0e81a16217f2dd8f09f8426e33ebe5.tar.gz |
Add a --quiet option, to suppress all the routine warnings when scanning for pod
-rw-r--r-- | pod/buildtoc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pod/buildtoc b/pod/buildtoc index 5a680b1591..a8ea3bcbe8 100644 --- a/pod/buildtoc +++ b/pod/buildtoc @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use vars qw($masterpodfile %Build %Targets $Verbose $Up %Ignore +use vars qw($masterpodfile %Build %Targets $Verbose $Quiet $Up %Ignore @Master %Readmes %Pods %Aux %Readmepods %Pragmata %Modules %Copies %Generated); use File::Spec; @@ -18,6 +18,7 @@ $masterpodfile = File::Spec->catdir($Up, "pod.lst"); # Generate any/all of these files # --verbose gives slightly more output +# --quiet suppresses routine warnings # --build-all tries to build everything # --build-foo updates foo as follows # --showfiles shows the files to be changed @@ -45,6 +46,7 @@ $0: Usage: $0 [--verbose] [--showfiles] $filesopts __USAGE__ unless @ARGV && GetOptions (verbose => \$Verbose, + quiet => \$Quiet, showfiles => \$showfiles, map {+"build-$_", \$Build{$_}} @files, 'all'); # Set them all to true @@ -254,7 +256,7 @@ close MASTER; return; } } - warn "$0: $file: cannot find =head1 NAME\n"; + warn "$0: $file: cannot find =head1 NAME\n" unless $Quiet; } } } |