Gossamer Forum
Home : General : Perl Programming :

mod_perl modules available to all?

Quote Reply
mod_perl modules available to all?
Having successfully installed mod_perl for LSQL, I'm trying to work out how to make the best use of it overall. Unfortunately, most of the documentation on the web deals with much more complex situations than I'm aiming for.

My main operational question now is:

If I preload modules into mod_perl from a startup.pl file at the master httpd.conf level (not in the virtual host overrides), are those modules automatically available to - and used by - all scripts on the physical server, in every virtual host. Or - are they only used by scripts using mod_perl (that is, scripts referenced to mod_perl by a location directive)

For example, I have several scripts across several virtual hosts that use File::Basename. It seems sensible to load that into the master mod_perl via startup.pl. But then, does any script on the (physical) server automatically use that version of File::Basename simply by having the line "use File::Basename;", or do I have to rewrite my scripts so they behave properly under mod_perl and then get them run by mod_perl by referencng them in a location directive?

Thanks for any help - I'm worried about experimenting blindly as it looks like bad choices could make things much worse.