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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.