ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
we just bought a web-project which uses perl scripts.
Now we have a problem to get it up and running. The guy who wrote the whole thing did not leave his perl scripts in the regular folders which are defined in @INC but in a different one.
Well one way to get it to work is to edit every single file and add the line use "/my/dir/" but that is not an option since there are hundreds of files.
Is there any way to edit the @INC array globally so that I can add the dir to it?
If you can afford a change to the way Perl is invoked, you can use the -I option to add the immediately proceding directory to the @INC array. For example, `perl -I/my/dir script.pl`. I'm pretty sure that will not overwrite what's already in @INC, but I'm not positive. You'll find out the first time you try it; but don't worry, it won't damage anything.
OK, according to some mod_perl documentation, modifying @INC during script execution will not affect anything other than the currently executing script, so that's out. But, it does say you can change @INC to take effect at server startup and therefore be used by any script that may run. Summarised, you should be able to do
I'll admit that I don't know much about mod_perl, but from this post it seems like it might have to be inside a <Location> block. If that doesn't work, I'm not sure. You might also want to check out the Practical mod_perl book.
Edit: Also, take a look at the logs, if you've got access to them. At best case, something is writing some error messages in there that will make everything clear.
Last edited by taylor_venable; 05-02-2006 at 02:07 PM.