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

Hi,
I am brand new to perl. I posted a question yesterday, which required the use of some modules, however when i ran the program i recieved errors. I figured out that it was the modules that were causing the error. I was wondering, how can i find out where on the server the modules would be so i can verify weather they are installed or not. Also, if it is not in there, how do i install modules? Do i just upload the module to the server?
Thanks
Dipul

Replies are listed 'Best First'.
Re: Locating Modules
by kilinrax (Deacon) on Oct 31, 2000 at 19:29 UTC
    To find out if a module is installed on your system, try typing the following at a shell prompt:
    perl -M'[module name]' -V
    This will print something starting like:
    Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: ....
    If the module is installed, or:
    Can't locate [module name] in @INC (@INC contains: /usr/lib/perl5/5.00 +5/i386-linux /usr/lib/perl5/5.005 /usr/local/lib/site_perl/i386-linux + /usr/local/lib/site_perl /usr/lib/perl5 .). BEGIN failed--compilation aborted.
    If it isn't.
Re: Locating Modules
by merlyn (Sage) on Oct 31, 2000 at 19:26 UTC
    You've gotten answers to all of these in the chatterbox just now. Please pay attention.

    To find out what you've got installed, use ExtUtils::Installed.

    To install things in your personal directory, read perlman:perlmodinstall.

    To find out where things are installed, use perl -V which will tell you among other things what the @INC path is.

    -- Randal L. Schwartz, Perl hacker

Re: Locating Modules
by neophyte (Curate) on Oct 31, 2000 at 19:39 UTC
    man perlfaq2 contains material about obtaining modules

    neophyte

Re: Locating Modules
by TGI (Parson) on Nov 01, 2000 at 02:45 UTC
    Use this script:
    #! /usr/bin/perl print join "\n",@INC;
    It will print a nice list of what directories are set up to contain modules.
      or just type perl -V.