in reply to A lil module creation advice

Sounds to me like you need a pretty specific spec to code to.

One of the fundemental concepts I use when coding (whether OO-style or using my functional-fu) is high cohesion, low coupling.

What this translates to is each "interdependant" block of your should almost be able to be executed standalone, ie it takes input, does some processing and spits something out. In reality this translates to having all the infrastructure to operate standalone (eg db handles, file handles etc)

So, given this coding style, it should be relatively easy to create a test.pl to test all your methods, based on the specification.

Even before you put fingers to k/b there is a process known as "bench testing" which means, taking the technical design (while still on paper) and running data thru' it (still on paper (or virtual paper)). Once you are satisfied with the paper design, you start to cut the code.

I guess the main point is planning. You must take the time to plan good code and good systems.