in reply to perl_mod caching DBI responses
However, whenever I try to run it via mod_perl, it appears that the DBI responses are being cached in a mod_perl thread (or whatever it uses). This is a bad thing. FWIW, using (or not using) Apache::DBI doesn't make a difference.
This "Bad Thing" (which it is not) comes forth from not using strict, and more directly from using global variables. With mod_perl, global variables are persistent for the interpreter is embedded in Apache itself and will not exit until Apache exits. When programming for mod_perl, ALWAYS use strict! (Actually, remove "When programming for mod_perl, " and just always use strict.)
You can't get away with sloppy programming in mod_perl. Find more information about mod_perl before doing anything with it, as incorrect use may fry your Apache.
- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: perl_mod caching DBI responses
by fuzzyping (Chaplain) on Jul 02, 2002 at 14:40 UTC | |
by perrin (Chancellor) on Jul 02, 2002 at 15:19 UTC |