in reply to CGI works, not with mod_perl??

If you're talking about libraries you've wrtitten and installed in other than the standard module locations, you need to a 'use lib' in startup.pl to tell mod_perl where to look. It's still hard coded, but only once.

From the top of my startup.pl

BEGIN { use Apache (); # use lib Apache->server_root_relative('lib/perl'); use lib '/usr/local/apache/rushcgi'; # to make 'use Rushglobal' wo +rk }

Because it runs in startup.pl, all of your apache processes inherit the addition to @INC.

The commented out line is, I supsect, better for moving things from one server to another. I think it worked for the default location of modules. I'm not sure why I stopped using it. ("What a drag it is, getting o-old.")

Update: on my RH9 machine @INC looks the same in each environment, including the presence of:

.

so I don't get it. However, I may be comparing apples and oranges, as the startup.pl is from an old RH6.0 box that no longer has mod_perl in place, whereas the comparision between CGI and modperl was done on RH 9.

--Bob Niederman, http://bob-n.com

Replies are listed 'Best First'.
Re: Re: CGI works, not with mod_perl??
by perrin (Chancellor) on Jul 21, 2003 at 01:06 UTC
    Maybe you commented out that line because mod_perl already adds that directory to @INC automatically. There's no need to do it yourself.

      That's a good reason! Thanks for helping out my filing memory.

      --Bob Niederman, http://bob-n.com