First, thanks for the feedback on part I. As I wait for Perl Medic to arrive, I've been reading some other documentation.

Things seem to be clicking a bit. Along with keeping my POD up-to-date, I've also been writing tests. I've slowly been finding it easier to write tests into proper test files for my modules, but there are some things I still find easier to write one-offs for. I'd like to eliminate this behavior completely.

Some of my processes have a high number of levels in it's stack trace. Some methods delete entries from an external DB, and create another record with updated data. Some rely on external information that the program doesn't know at runtime. The side-effect of this is having to manually edit test vars frequently.

My questions are as such: does it make sense to use Storable to store() known data in a sub-directory in the t/ dir, in order to 'simulate' results, so I don't have to manually edit test files? Theoretically, if my database schema doesn't change, then loading test data should be ok. This way, I don't have to code db access into all of my test files, and so long as I use known good data, I can be confident when I write a test before I write the sub. Does this sound reasonable? Leaving the test data in the distribution in such a fashion?

Steve


In reply to Help with design philosophy II: Testing by stevieb

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.