Personally, I love Test::Deep, and I use it quite often internally for testing. However, I might be wary of including into a public module since Test::Deep itself has many dependecies:

Test::More => '0', Test::Tester => '0.04', Test::NoWarnings => '0.02', Scalar::Util => '1.09', List::Util => '1.09',
(which themselves may have more dependencies too, its been a while since I installed Test::Deep, so I dont recall).

However, I do make heavy use of Test::Exception in a lot of the test suites of my modules on CPAN, and I do require it in the Makefile.PL. I will usually comment in the README file that it is for the test suite only, so the user could choose to ignore it I suppose. Of course, that too does have its dependencies:

Test::Builder => 0.13, Test::Builder::Tester => 0.08, Test::More => 0.44, Sub::Uplevel => 0.06,
I think what you need to ask yourself is, how important are the Test::Deep tests to the overall functionality of your module? Do they test critical parts, or edge cases? Can you write equivalent Test::More tests without too much trouble? Your example code looks like is_deeply might be able to handle it, are you actual tests any more complex?

My personaly opinion is that you should include it. Having to download and install dependencies, if you are using CPAN is pretty trivial (if you configure it as such). Anyone who really complains about having to wait that extra few seconds is likely someone who wont run make test in the first place.

-stvn

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