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

I have some code that works on NT. Now that I need it to also run in UNIX, I am quickly becoming familiar with the intricacies of migrating code from NT to Unix.br> My specific error in Unix is...

use HTTP::Request::Common ();

is throwing a "can't locate Http/Request/Common.pm"

Any ideas?
Thanks.
Jered
  • Comment on NT to Unix: HTTP::COMMON:: REQUEST issues

Replies are listed 'Best First'.
Re: NT to Unix: HTTP::COMMON:: REQUEST issues
by blackmateria (Chaplain) on Nov 07, 2001 at 23:15 UTC
Re: NT to Unix: HTTP::COMMON:: REQUEST issues
by VSarkiss (Monsignor) on Nov 07, 2001 at 23:21 UTC

    The use and require functions will search directories in your @INC array to find a requested file. Perl is just telling you it couldn't find the particular file. I can think of at least three possible problems, and ways to solve them:

    1. The module is really not installed on the box. Find and install it.
    2. The module is installed, but the directory is not in @INC. Two possible remedies: either add a
      use lib '/where/it/is';
      to your code to give Perl an additional directory to search, or set the PERL5LIB environment variable the same way.
    3. The file is installed, and the directory is in @INC, but there's a permission problem (you can't read the file or search the directory). It's more likely this would've produced a permission error than a "Can't locate", but it is possible. Carefully check permissions on all directories and the library file: make sure files are readable ("r" bit in permissions) and directories are searchable and readable ("x" and "r" bits).

    HTH