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.


In reply to Re: A lil module creation advice by Ryszard
in thread A lil module creation advice by snafu

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.