Re: Adding path to @INC for use with web server

2002-10-11 Thread Adam Witney


Well yes, that¹s why I don't want to have local info, like where to look for
modules, in my script.

adam


 We recently discussed Portability on this list. If you want to write
 scripts that run on other systems then you have to accommodate that design
 goal with code. 
 -- 
 
 Bill Stephenson
 www.SecureShopper.com
 1-417-546-5593
 
 
 
 From: Adam Witney [EMAIL PROTECTED]
 Date: Thu, 10 Oct 2002 11:09:38 +0100
 To: MacOS X perl [EMAIL PROTECTED]
 Subject: Adding path to @INC for use with web server
 
 Hi,
 
 Searching the archives I have been able to find out how to get Perl to
 search other paths for modules when invoked from the terminal or from GUI
 apps such as BBEdit, however I cannot get them recognised by cgi scripts.. I
 read somewhere to add this line to httpd.conf
 
 PerlSetEnv PERL5LIB /sw/lib/perl5
 
 However that doesn't seem to help
 
 I could just add 
 
 use lib 'path';
 
  to the top of each script, but these scripts will be moved to other OS's
 so I don't want to have to add lines for this purpose
 
 Any ideas on how to do this?
 
 Thanks
 
 adam


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




Re: Adding path to @INC for use with web server

2002-10-10 Thread gene

 From: Adam Witney [EMAIL PROTECTED]
 Date: Thu, 10 Oct 2002 11:09:38 +0100
 To: MacOS X perl [EMAIL PROTECTED]
 Subject: Adding path to @INC for use with web server

 Hi,

 Searching the archives I have been able to find out how to get Perl to
 search other paths for modules when invoked from the terminal or from 
 GUI
 apps such as BBEdit, however I cannot get them recognised by cgi 
 scripts. I
 read somewhere to add this line to httpd.conf


You can include this code in httpd.conf:

Perl
use lib '';
/Perl

I assume that this directive requires mod_perl
Alternatively you can do
PerlRequire /../../perl_config_file.pl
and then in that perl config file, include your 'use lib' code.