Think about Loose Coupling | |
PerlMonks |
Re: Coming up with good examples in PODby stevieb (Canon) |
on Jul 25, 2020 at 19:51 UTC ( [id://11119801]=note: print w/replies, xml ) | Need Help?? |
I usually snag chunks of my test files to use in SYNOPSIS and EXAMPLES sections. That, or take some test parts and slightly modify them for such a purpose. Your unit test suite should have every imaginable (to you) angled use of your software, and tests should be written before, or as you write code, so A) you know it works, B) it should be literally copy/pasteable and C) so long as the test code never changes, your examples shouldn't have to either.
In Section
Seekers of Perl Wisdom
|
|