diff options
author | Marek Rouchal <marek.rouchal@infineon.com> | 2003-08-27 19:25:28 +0200 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-29 07:04:17 +0000 |
commit | c23d1eb0e18a49361001d26c686323d50b0c6d21 (patch) | |
tree | 8a99ae1c763716321f085b9eec2826a95cc51461 /pod/podchecker.PL | |
parent | 4cbfc073c684f8df92bed18af079c31ca9949ba5 (diff) | |
download | perl-c23d1eb0e18a49361001d26c686323d50b0c6d21.tar.gz |
RE: [PATCH] Pod::InputObjects performance de-pessimization
Message-ID: <9843A649BAD7FB4686F6FCBC840D600E08381508@mucse001.eu.infineon.com>
PodParser-1.25 prerelease.
p4raw-id: //depot/perl@20928
Diffstat (limited to 'pod/podchecker.PL')
-rw-r--r-- | pod/podchecker.PL | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/pod/podchecker.PL b/pod/podchecker.PL index 20d5e94c2e..1a903b50aa 100644 --- a/pod/podchecker.PL +++ b/pod/podchecker.PL @@ -148,23 +148,29 @@ pod2usage(2) if ((@ARGV == 0) && (-t STDIN)); ## Invoke podchecker() my $status = 0; @ARGV = qw(-) unless(@ARGV); -for (@ARGV) { - if($_ eq '-') { - $_ = "<&STDIN"; +for my $podfile (@ARGV) { + if($podfile eq '-') { + $podfile = "<&STDIN"; } - elsif(-d) { - warn "podchecker: Warning: Ignoring directory '$_'\n"; + elsif(-d $podfile) { + warn "podchecker: Warning: Ignoring directory '$podfile'\n"; next; } - my $s = podchecker($_, undef, '-warnings' => $options{warnings}); - if($s > 0) { + my $errors = podchecker($podfile, undef, '-warnings' => $options{warnings}); + if($errors > 0) { # errors occurred + printf STDERR ("%s has %d pod syntax %s.\n", + $podfile, $errors, ($errors == 1) ? "error" : "errors"); $status = 1; } - elsif($s < 0) { + elsif($errors < 0) { + print STDERR "$podfile does not contain any pod commands.\n"; # no pod found $status = 2 unless($status); } + else { + print STDERR "$podfile pod syntax OK.\n"; + } } exit $status; |