New to mod perl help

2001-01-23 Thread John Michael



After my earlier attempts to use mod perl I had 
little success, so I have alittle more time, so I thought I would try it 
again. I have a couple ofquestions. I have read through the 
documentation and some of it is unclearsometimes until you really know what 
you are doing.I understand about using strict and vars.I know that the 
modperl script has to go in the httpd/perl folder so thatapache will 
recognize it.I also have modperl installed and setup correctly. The 
test script runs fine.
However, I have about 20 virtual host that each 
all have their own cgi-bins.
If I move the scripts into the httpd/perl folder, 
if I just require themfrom the virtual 
cgi-bins, will they work and how do I pass variables tothese 
scripts.

These are just regular cgi scripts. I just 
wanted to gain the effects of the embedded interpreter and start experimenting 
with the script. Ido have some scripts that would probably benefit 
from them anyway.

I'm just trying to figure out howit all ties 
together.

As an example, I have a script that runs via server 
side include. When ever someone hits the web page with this include, the 
script runs, it keeps the referer, and also routes the user based on this 
referer.
I use the same script on about 40 sites and the 
imformation the script keeps is kept in a seperate folder for each relative to 
where the script iwas called from. 
I call the script with a require statement and 
would like to try and get this thing working with modperl to reduce server 
load.thanks in advance--John 
Michael


Re: New to mod perl help

2001-01-23 Thread Paul J. Lucas

On Tue, 23 Jan 2001, John Michael wrote:

 I know that the modperl script has to go in the httpd/perl folder so that
 apache will recognize it.

You can put the script anywhere you please.  You only have to
make sure the directory is "use lib"'d.

 If I move the scripts into the httpd/perl folder, if I just require them from
 the virtual cgi-bins, will they work and how do I pass variables to these
 scripts.  These are just regular cgi scripts.

You pass them the same way you always have.

 I just wanted to gain the effects of the embedded interpreter and start
 experimenting with the script.

You actually have to configure Apache::Registry to handle the
scripts in said directories, of course.

- Paul