As far as I can tell, cmp_deeply() does exactly what is_deeply() from Test::More does. If you're not using any of the more esoteric functions from Test::Deep then I'd say switch to Test::More and definitely list it as a prereq.

On a more philosophical note ... it's your module and you can list anything you like as a prerequisite. If it's a tool that makes your development easier and makes it easier to debug problem reports from the field then of course you should use it. If someone wants to use something you're giving away for free but they can't be bothered to install a test module then that's their loss not yours.

Looking at it from a slightly different angle though ... someone building a 'binary' distribution of your package (eg: for RPM or APT etc) shouldn't include the Test::* dependencies, or the test scripts either for that matter.

Update

Sorry I phrased that badly. I do/did realise that Test::Deep's cmp_deeply gives a lot more flexibility in comparing deep data structures. What I meant to say was that the code in the OP's example wasn't obviously using any of the extra flexibility.


In reply to Re: Should a CPAN module list Test:: modules as dependencies? by grantm
in thread 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.