in reply to Re^2: Extracting/embedding sample files in POD
in thread Extracting/embedding sample files in POD
How it works
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
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.
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 =)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Extracting/embedding sample files in POD
by Yary (Pilgrim) on Feb 19, 2015 at 19:47 UTC | |
by LanX (Saint) on Feb 19, 2015 at 22:29 UTC |