Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Writing tests for a module

by bikeNomad (Priest)
on Jun 05, 2001 at 22:21 UTC ( #85927=note: print w/replies, xml ) Need Help??


in reply to Writing tests for a module

I don't bother checking in my modules, but it's reasonable to check in your Makefile.PL so they know when installing it (or CPAN.pm knows) that they need something else. I even check for standard modules. If you use ExtUtils::MakeMaker, just add a PREREQ_PM hash arg to the arguments to WriteMakefile. From Archive-Zip's Makefile.PL:

WriteMakefile( #snip PREREQ_PM => { 'Compress::Zlib' => 1.06, 'Carp' => 0, 'File::Path' => 0, 'File::Find' => 0, 'File::Basename' => 0, }, #snip );

If you have PREREQ_PM set, CPAN.pm will use it to load prerequisites. Also, the .PPD file (used by PPM) will have the dependency information, which will allow PPM to load the required modules.

update: added explanation at end

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://85927]
help
Chatterbox?
[perldigious]: w4st3 n0t w0t n0t
thezip is randomly reminded of Hugo's_house_of_ho rrors

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (14)
As of 2017-03-24 18:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (305 votes). Check out past polls.