X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FPod%2FChecker.pm;h=e899f59031d0ca6e0126ca229458d30188cce8a7;hb=4e592f10f45677b2800948f688180c0f1ee587b4;hp=f20fe84c4cddb2158f0ffd6230cbb54f4dcf0a47;hpb=3c4b39bee8832007b7e91bfce8701d34cacab411;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Pod/Checker.pm b/lib/Pod/Checker.pm index f20fe84..e899f59 100644 --- a/lib/Pod/Checker.pm +++ b/lib/Pod/Checker.pm @@ -10,7 +10,7 @@ package Pod::Checker; use vars qw($VERSION); -$VERSION = 1.42; ## Current version of this package +$VERSION = 1.4301; ## Current version of this package require 5.005; ## requires this Perl version or later use Pod::ParseUtils; ## for hyperlinks and lists @@ -57,7 +57,7 @@ Curious/ambitious users are welcome to propose additional features they wish to see in B and B and verify that the checks are consistent with L. -The following checks are currently preformed: +The following checks are currently performed: =over 4 @@ -82,7 +82,7 @@ C...LE...E...E>). =item * -Check for malformed or nonexisting entities C...E>. +Check for malformed or non-existing entities C...E>. =item * @@ -142,7 +142,7 @@ There is no specification of the formatter after the C<=for> command. =item * unresolved internal link I The given link to I does not have a matching node in the current -POD. This also happens when a single word node name is not enclosed in +POD. This also happened when a single word node name is not enclosed in C<"">. =item * Unknown command "I" @@ -234,7 +234,7 @@ C<=over>/C<=back> block. =item * =item type mismatch (I vs. I) -A list started with e.g. a bulleted C<=item> and continued with a +A list started with e.g. a bullet-like C<=item> and continued with a numbered one. This is obviously inconsistent. For most translators the type of the I C<=item> determines the type of the list. @@ -282,7 +282,7 @@ C<=head1>. =head2 Hyperlinks -There are some warnings wrt. malformed hyperlinks. +There are some warnings with respect to malformed hyperlinks: =over 4 @@ -332,8 +332,8 @@ Since PodParser-1.24 the B module uses only the B method to print errors and warnings. The summary output (e.g. "Pod syntax OK") has been dropped from the module and has been included in B (the script). This allows users of B to -control completely the output behaviour. Users of B (the script) -get the well-known behaviour. +control completely the output behavior. Users of B (the script) +get the well-known behavior. =cut @@ -364,6 +364,7 @@ my %VALID_COMMANDS = ( 'for' => 1, 'begin' => 1, 'end' => 1, + 'encoding' => '1', ); my %VALID_SEQUENCES = ( @@ -623,9 +624,11 @@ sub poderror { if(!%opts || ($opts{-severity} && $opts{-severity} eq 'ERROR')); ++($self->{_NUM_WARNINGS}) if(!%opts || ($opts{-severity} && $opts{-severity} eq 'WARNING')); - my $out_fh = $self->output_handle() || \*STDERR; - print $out_fh ($severity, $msg, $line, $file, "\n") - if($self->{-warnings} || !%opts || $opts{-severity} ne 'WARNING'); + unless($self->{-quiet}) { + my $out_fh = $self->output_handle() || \*STDERR; + print $out_fh ($severity, $msg, $line, $file, "\n") + if($self->{-warnings} || !%opts || $opts{-severity} ne 'WARNING'); + } } ################################## @@ -1101,7 +1104,7 @@ sub _check_ptree { } if($nestlist =~ /$cmd/) { $self->poderror({ -line => $line, -file => $file, - -severity => 'ERROR', + -severity => 'WARNING', -msg => "nested commands $cmd<...$cmd<...>...>"}); # _TODO_ should we add the contents anyway? # expand it anyway, see below