I love having documentation close to the source, my POD doubles as comments at the head of each subroutine definition. If I were to go the route of an external
module.pod- and I would if releasing anything to CPAN- I'd still write the POD source inside of
module.pm and generate the pure-POD-file from that.
And in fact that looks like an intended use of POD::Tested, its processor can generate POD or test files from the same marked-up module. (I contacted the author with a comment earlier, can vouch the author is indeed dogfooding.)
My co-workers- the only other people who may look at this code- would not think to look at a separate POD file, but are grateful for good documentation in the module. So I am not going down the road of generating an external POD, even though I now see smooth ways of doing that with all desired features.
And a good-enough work-around would be to simply create the file as part of the test:
Given a file F<test.data> as below...
File::Slurp::write_file("test.data",qq<<'END');
Here is data
that this function wants
END
Results in
# test continues here
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.