I can't seem to figure out how to modify the contents of @INC. I want to tell perl to look in a different directory when searching for modules. Any thoughts?
Modify the contents of @INC
Collapse
X
-
-
if you look at the online perldoc, this is what is stated
perldoc -q INC
Code:How do I add a directory to my include path (@INC) at runtime? Here are the suggested ways of modifying your include path: the PERLLIB environment variable the PERL5LIB environment variable the perl ‐Idir command line flag the use lib pragma, as in use lib "$ENV{HOME}/myown_perllib"; The latter is particularly useful because it knows about machine dependent architectures. The lib.pm pragmatic module was first included with the 5.002 release of Perl. -
This is what you need:
Comment
-
Thanks that works. However now a new problem. Spent 5 hours searching google and online docs but ... you know the drill
I am running IIS6 and last week all my scripts ran fine. Something changed because out of the blue all my scripts started saying "Cant locate XXX.pm in @INC" I used the lib to fix that and now I get "The specified CGI application misbehaved by not returning a complete set of HTTP headers."
All my scripts print out "Content-type: text/html\n\n" before anything else so I thought this error was a result of installing PHP but I still get this even after I removed PHP.
Thanks
BobComment
Comment