From: Nicholas Clark Date: Sat, 18 Apr 2009 11:24:18 +0000 (+0100) Subject: Add a --quiet option, to suppress all the routine warnings when scanning for pod X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d092c3cd1c0e81a16217f2dd8f09f8426e33ebe5;p=p5sagit%2Fp5-mst-13.2.git Add a --quiet option, to suppress all the routine warnings when scanning for pod --- diff --git a/pod/buildtoc b/pod/buildtoc index 5a680b1..a8ea3bc 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; } } }