hmm, some clarifications:
Pod structure:
How it works
- perldoc Module will display pod for Module.pod if found.
- only perldoc Module.pm will show pod for Module.pm
- in my system Module.pod is meant for the general API seen e.g. CPAN! (YMMV)
- Module.pm still contains valid pod! It's showing more detailed developer documentation
So if your collaborators open Module.pm they'll find what they need to see, plus maybe a disclaimer/link pointing to Module.pod
Workflow:
You seem to have the idea to automatically modify your Module.pm with test results.
I'm not a friend of such self modifying magic (at least outside my IDE and w/o human monitoring).
I prefer a strict separation between
- Model: e.g. Module.pm, test scripts
- View: Module.tpl.pod
- Controller: the "podcreator.pl" defining the logic
- Product: Module.pod, Readme(.pod),...
Known modules
I can't comment much on the CPAN modules you mentioned cause creating Pod from tests or vice versa wasn't on my task list yet.
I can imagine at least two cases where such a DRY workflow is beneficial:
a) sample code in POD (like in tutorials) which needs to be tested before publication
b) simple (unit) tests which are self documenting (e.g. showing use cases, function signature, and so on)
In any case I'd prefer to have a generic test script for such cases (the controller ) in my t/ directory which extracts the necessary data from the module's pod (the model ), to do the testing and create test reports and new POD (the product ).
Like this I can always resort to more complicated plain test scripts if embedding the logic within POD starts to over complicate things.
differences
I'm realizing now that your use case seems to be different or more fuzzy, so take my 2¢ as a meditation.
Thanks anyway this helped me improving my concept.
HTH =)
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.