Link to home
Start Free TrialLog in
Avatar of Neo
NeoFlag for Cyprus

asked on

perl modules

Hi, I have a perl script which has the following modules listed at the beginning:

use CGI::Carp qw( fatalsToBrowser );
      use DBI;
      use CGI qw( :standard );
      use CGI::Cookie;
      use Crypt::CBC;
      use lib qw( . );
      use POSIX qw( ceil );
      use List::Util qw( shuffle );
      use strict;

How can I check to see if all the above exist on a linux server, and that they are in the correct locations, with the correct permissions and ownerships?
SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Neo

ASKER

Great, thanks for the answers, I tried both  methods and all the modules are installed.

wilcoxon: I noticed the INST_FILE descriptive for the modules. Is this always the path which a script will go to in order to access a module? (for example in cases where there are multiple installations of the same module)

Also, if I could locate the module using the method you showed, is it certain that a script using the module would be able to locate and access it as well?
Yes, INST_FILE is always the path to the installed module.  I'm not sure what will happen if multiple versions are installed (I don't currently have such a case).

Yes, unless something is very strange with your perl install, if CPAN says a module is installed, perl scripts should always be able to use the module.  The one possible case I can think of where it might fail is if someone goes in and manually removes the file (I believe (not positive) that CPAN checks the install list/db rather than manually locating the files) - again, this is not something that should happen.