tags:

views:

85

answers:

1

I have a Perl application someone else wrote and I'm trying to make it run on my local machine. But I keep getting an error in one of the modules, which appears to be based on a missing module somewhere. What are some good tools or practices to track this thing down?

+5  A: 

If you've got a missing module, you'll get an error like this:

Can't locate Does/Not/Exist.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .).

The best place to track down Perl modules is CPAN search. You can install them using the CPAN shell, available by running:

perl -MCPAN -e shell

You may also be able to get them from your Perl vendor/Linux distro.

As for finding them all, two approaches come to mind:

  1. When you ran perl Makefile.PL, it should have told you all the modules you need to install. Of course, this is only if whoever wrote the app bothered to make it work.

  2. Search the files for 'use' and 'require' directives.

derobert