Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Should a CPAN module list Test:: modules as dependencies?

by Juerd (Abbot)
on Jul 20, 2004 at 08:13 UTC ( [id://375850]=note: print w/replies, xml ) Need Help??


in reply to Should a CPAN module list Test:: modules as dependencies?

No.

I believe that the test suite should be an entirely optional part of the distribution. If I choose to skip the "make test" step, I do not need the module at all.

However, test suites are important, and having that extra module can certainly help you find bugs earlier and thus eventually help me, the user of your module.

For Test:: modules, I prefer that they are included in the distribution (like Test::More often is). It does mean that you, the module author, have more to maintain.

Even if your module itself can use certain modules, that does not always have to mean you have to depend on them. For example, DBIx::Simple can use SQL::Abstract, DBIx::XHTML_Table and Text::Table, but if the user decides not to use that functionality, they're never even loaded. This means more work for the users who do wish to use these features, but at least *they* can choose.

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

  • Comment on Re: Should a CPAN module list Test:: modules as dependencies?

Replies are listed 'Best First'.
Re^2: Should a CPAN module list Test:: modules as dependencies?
by jkeenan1 (Deacon) on Jul 20, 2004 at 13:18 UTC
    I second Juerd's argument.

    There are a few testing functions I like to use which wrap around the basic ok() function. I put them in a Test::Special module which sits under the t/ directory and which is brought into each file in the test suite simply by:

    use lib ("./t"); use Test::Special;

    See, for example, List::Compare.

    OTOH, Test::Deep is by now quite a large set of modules and it might be a bit much to include it in your distribution solely for the purpose of testing.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://375850]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-19 23:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found