PerlMonks now uses this:
The first is needed for if you have any 'use' statements happening at compile-time of your main script. The second is needed if you have any use/require statements happening at run time (and are using mod_perl).use lib "/home/onthe/range"; # For when this is compiled lib->import("/home/onthe/range"); # For subsequent hits
We used to have a config file that set this up seperately for all of our scripts but it just disappeared one day (or I'd tell what it did to provide you another alternative). (And before that we had a bunch of 'use lib' statements everywhere we did use/require at run time.)
Note: The terms "compile time" and "run time" are a bit ambiguous. Sometimes they are used to refer to the per-statement compile vs. run times. Sometimes they are used to distinguish between before or after when the main script starts running "regular" code. I don't usually have difficulty telling which is meant so I'll just leave it at that. (:
In reply to Re: PERL5LIB with Apache (PM's)
by tye
in thread PERL5LIB with Apache
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |