I'm working on a module that I'll be releasing onto CPAN shortly. The test suite requires Test::Deep to verify certain results.

Aside: this is an extremely useful module. It lets you do things like:

cmp_deeply( $result, [ 1, undef, [[2, 3], [4, [5, 6]], {a => 'foo', b => [7, [8, [9, 10]]] } ], 'ok' );

... and it Just Works™

Now my question is, should I list Test::Deep as a prerequisite? (update just after posting: the whole point of this being that Test::Deep is less common than Test::Simple or Test::More. I'm being vain enough to think that for a certain number of cases this will be the first time it's encountered by people) I can argue both ways:

Yes: because testing is good, and you get the feeling of security that when my module was installed everything checked out ok. Any remaining bugs are my own. So you need to install this other module for your own peace of mind (In other words, trust me, I know what's good for you).

No: because it's one more thing to download. If you don't have it, or choose not to install it when I ask for it, I can live with that. If I see that the module is not installed, I'll just skip over the tests that require it. Of course if you do find a bug, I'd prefer that you take the time to re-run the test suite with Test::Deep.

I'm leaning towards the second course, because I think it provides more flexibility. If you don't want to test, who am I to stand in your way? And if for some reason you can only install my module, but not Test::Deep, the world won't come to an end, my module will still work.

Thoughts?

- another intruder with the mooring of the heat of the Perl


In reply to Should a CPAN module list Test:: modules as dependencies? by grinder

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.