[Chicago-talk] CPAN prerequisite

Mike Fragassi frag at ripco.com
Fri Oct 28 09:24:12 PDT 2005


On Fri, 28 Oct 2005, Jay Strauss wrote:

> I'm building my first CPAN module.  Is there a way to learn all the
> dependences of a module, or do I need to build a clean box, and do trial
> by error, till I get the prerequisite list?

  perl -MYour::Module -e  'print "$_\n" for keys %INC'

or, to double-check that you're using the correct versions of the required
modules:

  perl -MYour::Module -e 'while (($k,$v)=each %INC) { print "$k -> $v\n"; }'

> Also, I need to check if the user is installing on a threaded Perl.
> Would this be an appropriate, and good way to test, in the Makefile.PL

I've never used threads, but according to perldoc perlthrtut:

       Your programs can use the Config module to check whether
       threads are enabled. If your program can't run without
       them, you can say something like:

         $Config{usethreads} or die "Recompile Perl with threads to run this pro
gram.";

-- Mike F.


More information about the Chicago-talk mailing list