'use' doesn't work for files in local directories
Bill Moninger (moninger@fsl.noaa.gov)
Thu, 8 Feb 96 22:35:40 GMT
I successfully installed libwww-perl in a local directory (I don't have
root permissions), I thought.
However, when I try to use 'use', perl tells me it can't find the requested
module. Perl CAN find modules in the regular perl directory.
I get this error message:
Can't locate LWP.pm in @INC at test.pl line 17.
BEGIN failed--compilation aborted at test.pl line 17.
Here is the code that fails:
=============snip
#!/usr/local/perl -w
$scriptsDir="/public_WWW/utilities";
$wwwLibDir="lib";
unshift(@INC,$wwwLibDir);
unshift(@INC,$scriptsDir);
#check that what we think is in @INC is.
foreach $item (@INC) {
print "|$item|\n";
}
require "tmp-pub-lib.pl"; # finds this (in $scriptsDir) just fine
use Cwd; # this works
use LWP; # this DOESN'T work
==============snip
Thanks for any help you can provide.
-------------------------
William R. Moninger, Nat'l Oceanic & Atmospheric Administration (NOAA)
Forecast Systems Laboratory, R/E/FS1
325 Broadway; Boulder, CO 80303; USA
moninger@fsl.noaa.gov; Voice: 303-497-6435; Fax: 303-497-3329
URL: http://www.fsl.noaa.gov/frd-bin/bill.homepage.cgi