This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Unused 'cv'
[perl5.git]
/
pod
/
podchecker.PL
diff --git
a/pod/podchecker.PL
b/pod/podchecker.PL
index
20d5e94
..
75c316d
100644
(file)
--- a/
pod/podchecker.PL
+++ b/
pod/podchecker.PL
@@
-105,7
+105,7
@@
the given POD files has syntax errors.
The status 2 indicates that at least one of the specified
files does not contain I<any> POD commands.
The status 2 indicates that at least one of the specified
files does not contain I<any> POD commands.
-Status 1 overrides status 2. If you want unambig
ou
us
+Status 1 overrides status 2. If you want unambig
uo
us
results, call B<podchecker> with one single argument only.
=head1 SEE ALSO
results, call B<podchecker> with one single argument only.
=head1 SEE ALSO
@@
-114,8
+114,10
@@
L<Pod::Parser> and L<Pod::Checker>
=head1 AUTHORS
=head1 AUTHORS
+Please report bugs using L<http://rt.cpan.org>.
+
Brad Appleton E<lt>bradapp@enteract.comE<gt>,
Brad Appleton E<lt>bradapp@enteract.comE<gt>,
-Marek Rouchal E<lt>marek
@saftsack.fs.uni-bayreuth.de
E<gt>
+Marek Rouchal E<lt>marek
r@cpan.org
E<gt>
Based on code for B<Pod::Text::pod2text(1)> written by
Tom Christiansen E<lt>tchrist@mox.perl.comE<gt>
Based on code for B<Pod::Text::pod2text(1)> written by
Tom Christiansen E<lt>tchrist@mox.perl.comE<gt>
@@
-148,22
+150,30
@@
pod2usage(2) if ((@ARGV == 0) && (-t STDIN));
## Invoke podchecker()
my $status = 0;
@ARGV = qw(-) unless(@ARGV);
## 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;
}
next;
}
- my $s = podchecker($_, undef, '-warnings' => $options{warnings});
- if($s > 0) {
+ my $errors =
+ podchecker($podfile, undef, '-warnings' => $options{warnings});
+ if($errors > 0) {
# errors occurred
$status = 1;
# errors occurred
$status = 1;
+ printf STDERR ("%s has %d pod syntax %s.\n",
+ $podfile, $errors,
+ ($errors == 1) ? 'error' : 'errors');
}
}
- elsif($s < 0) {
+ elsif($
error
s < 0) {
# no pod found
$status = 2 unless($status);
# no pod found
$status = 2 unless($status);
+ print STDERR "$podfile does not contain any pod commands.\n";
+ }
+ else {
+ print STDERR "$podfile pod syntax OK.\n";
}
}
exit $status;
}
}
exit $status;