I'm relatively new to developing perl modules with Test::Harness type tests, and I feel like I'm missing something.

Basically, I can write Test::Harness tests, but they only tell me good v. bad with very little detail. I like to have a lot of details while I'm actually developing a module. As a consequence, I'm writing two different test scripts (or batches of scripts). One that I use while I'm developing and one that is for packaging with the module and running in Test::Harness.

Is there a way to write Test::Harness tests that can give me lots of details when I'm running them by hand, yet work as expected when run by "make test"?

I'll try and clarify a bit what I mean by more detail. I might want to "print ref($thing)" from time to time. I might want to "print $total_score". Sure, I could "warn $total_score", but that would make it look terrible when testing with "make test". I know there's "make install TEST_VERBOSE=1", which is better, but still not good enough. I'd be happy to "special_print( ref($thing) );" rather than "print ref($thing)", if that's what it takes.

Thanks!
--Pileofrogs


In reply to Testing Question by pileofrogs

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.