469,362 Members | 2,447 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,362 developers. It's quick & easy.

Modify the contents of @INC

4
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?
Jan 12 '07 #1
3 10922
ghostdog74
511 Expert 256MB
if you look at the online perldoc, this is what is stated
perldoc -q INC

Expand|Select|Wrap|Line Numbers
  1. How do I add a directory to my include path (@INC) at runtime?
  2.  
  3.        Here are the suggested ways of modifying your include path:
  4.  
  5.            the PERLLIB environment variable
  6.            the PERL5LIB environment variable
  7.            the perl ‐Idir command line flag
  8.            the use lib pragma, as in
  9.                use lib "$ENV{HOME}/myown_perllib";
  10.  
  11.        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.
  12.  
  13.  
Jan 12 '07 #2
miller
1,089 Expert 1GB
This is what you need:

http://perldoc.perl.org/lib.html
Jan 12 '07 #3
BobVDP
4
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
Bob
Jan 12 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Phester | last post: by
reply views Thread by Chris McKeever | last post: by
2 posts views Thread by Dung Ping | last post: by
28 posts views Thread by Charles Sullivan | last post: by
1 post views Thread by ed_spain | last post: by
4 posts views Thread by IchBin | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.