Skip Menu |

This queue is for tickets about the Pod-Parser CPAN distribution.

Report information
The Basics
Id: 43955
Status: resolved
Worked: 20 min
Priority: 0/
Queue: Pod-Parser

People
Owner: Nobody in particular
Requestors: jkeenan [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.38
Fixed in: (no value)



Subject: podchecker fails to detect superfluous =cut directive
In the Parrot distribution we have a variety of tests checking the syntax of documentation written in the POD format. One of them, t/codingstd/pod_syntax.t, calls a function called file_pod_ok() which is ultimately based on Pod::Simple: # Pulled from Test::Pod sub file_pod_ok { my $file = shift; my $checker = Pod::Simple->new; $checker->output_string( \my $trash ); # Ignore any output $checker->parse_file($file); return !$checker->any_errata_seen; } pod_syntax.t reports which files have POD syntax errors, but doesn't tell you what the errors are. Instead, it advises you to use 'podchecker' to detect and correct the errors. Recently, pod_syntax.t reported an error in a number of files. The attached file, TGE.pir, is a slimmed-down version of such files that displays the errant behavior. But when I ran this file through 'podchecker', no error was reported. The problem: 'podchecker' fails to detect the superfluous '=cut' directive near the end of the file. This extra =cut is what pod_syntax.t reports, as evinced by the fact that when I delete the extra =cut, pod_syntax.t reports no errors. Could podchecker be revised to detect superfluous =cut directives? Thank you very much. Jim Keenan
Subject: TGE.pir
# Copyright (C) 2005-2009, Parrot Foundation. =head1 NAME TGE - A tree grammar engine. =head1 SYNOPSIS # define a grammar leaf.tg transform min (Leaf) :language('PIR') { $P1 = getattribute node, "value" .return ($P1) } ... .end =head1 DESCRIPTION TGE is a tool for transforming trees. Think of it as a good old-fashioned substitution, but instead of taking and returning strings, it takes and returns trees. =cut .namespace [ 'TGE' ] .sub '__onload_first' :load # use other modules load_bytecode 'PGE.pbc' load_bytecode 'PGE/Util.pbc' .end =cut # Local Variables: # mode: pir # fill-column: 100 # End: # vim: expandtab shiftwidth=4 ft=pir:
An additional note: It would be good if podchecker's own POD indicated that it is distributed as part of Pod-Parser. Currently, the POD says to report bugs at rt.cpan.org -- but neither podchecker nor Pod- Checker has its own queue here. It took me about 20 minutes to locate podchecker as part of Pod-Parser and find the appropriate queue.
Fixed the bug and added the reference to the Pod-Parser distribution. Will be part of next release (1.40). Thanks for the hints! -Marek