Closed jkeenan closed 7 years ago
I use Pod::Weaver to turn =attr
into
=head1 ATTRIBUTES
=head2 <attr>
<attr text>
The rationale is mostly that it removes the need to ensure that the code is in a certain order under the given headings (which may be far away from the code being added), but also ensures I don't forget the headings (which I did, a lot). It also makes POD a bit more like the more robust systems of Javadoc and Pydoc, which just allow me to add docs to a thing and it figures out what kind of thing it is and shows the appropriate documentation.
But, yes, it does have this problem. I wrote a script that will weave the POD and display it like perldoc, but I've not yet put it on CPAN (not sure if I want to keep it named Pod::Weaver::CLI or name it App::weavedoc).
I've released App::weavedoc to the unsuspecting world (v0.001 on metacpan). This is as fixed as I can make it.
When I'm working with a file of Perl code (
.pm .pl .pod
), I expectperldoc somefile.pm
to Just Work. I expect that that any non-standard directives found inpod/perlpod.pod
, designed for use in custom formatters, will not causeperldoc
to drop content.The
.pm
files in this repository, however, use non-standard directives which drop content.This has a number of harmful effects. First, it causes the files to fail the tests in the standard
podchecker
utility.Second, and more importantly, it means that content is dropped from the output of
perldoc
,pod2text
and perhaps other utilities. Here is a section from the plain-text content of lib/CPAN/Testers/Backend/ProcessReports.pm:Now here's what
perldoc lib/CPAN/Testers/Backend/ProcessReports.pm
shows in that region:The text after the first
=cut
directive is not rendered.Is there a rationale for this?
Thank you very much. Jim Keenan