The 17th Chapter: module II QI.
design the interface of the module first. BA.
Turn the original code into inline.
Put the duplicated code in the subroutine.
Put the duplicate subroutine into the module. a nine.
use a three-part version number. Ii. 0.
programmatic implementation of your version requirements. Ii.
Export wisely and only when there are requests for possible situations. Ii.
consider exporting in a declarative manner. three.
do not turn variables into part of the module interface. Ii.
automatically creates a new module frame. Ii.
use core modules whenever possible. II-II.
Use the CPAN module when feasible. the 18th chapter: Testing and debugging second-Qi.
Write a test case first. Ii. Ba.
standardize your test cases with test::simple or test::more. Nine.
standardize your test set with test::harness. Ii. 0.
Write a failed test case. three.
both possible and impossible have to be tested. three.
Add a new test case before starting the test. three three.
be sure to use using strict. three.
Be sure to turn on the warning feature explicitly. three.
never assume that no warnings are correct during compilation. three continents.
explicitly and selectively turn off censure (stricture) or warning (warning),
and is within the smallest possible scope. the third seven.
learn at least the subset functionality of the Perl debugger. three ba.
the warning to use serialization when "Manual" debugging. three, nine.
Consider using "smart annotations" instead of warn statements when debugging.
Perl Best Practices (excerpt)---17