Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

What modules does my code require?

by beth (Scribe)
on Aug 10, 2005 at 19:38 UTC ( #482734=perlquestion: print w/replies, xml ) Need Help??

beth has asked for the wisdom of the Perl Monks concerning the following question:

When, in the course of human events, it becomes necessary to deploy our codebase (several svn checkouts containing perl modules, mod_perl scripts, command-line perl scripts) on a new machine, we usually forget to install some important required module.

How can we obtain a list of perl modules used/required by our codebase? Module::Info says it can get this information, but only for modules and not scripts. perl -c will die only on the *first* used module that is not available (obviously, we are interested in *all* such modules).

What other options do we have? I've been eagerly poking through the Test:: namespace, but have not yet found anything that does what we need.

Replies are listed 'Best First'.
Re: What modules does my code require?
by davidrw (Prior) on Aug 10, 2005 at 19:49 UTC
Re: What modules does my code require?
by xdg (Monsignor) on Aug 10, 2005 at 19:58 UTC

    Module::Info explicitly says you can hand it a script, not just a ".pm" file. Various other options: Module::ExtractUse, Module::ScanDeps, and Module::PrintUsed. Since it's your own, trusted code, you might like to try the last one.

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://482734]
Approved by Limbic~Region
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2022-11-29 04:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?