Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-24 00:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found