On Thu, 2003-08-14 at 03:33, Matt Sergeant wrote:
> Yeah basically that sort of thing, but also allow it to be used outside 
> mod_perl by making sure you wrap all the cleanup stuff in if 
> ($ENV{MOD_PERL}) {} and do the cleanup in END{} otherwise. That's the 
> main reason I roll my own - because I use it extensively outside of 
> mod_perl (though like David, I'm also not doing cleanup *blush*).

You guys should just be using DBI->connect_cached then.  It does
everything except the mod_perl cleanup handler.

Note that I still write a utility class that knows where to get the
database config and returns a connection, but I don't worry about doing
anything to keep the connection persistent or ping it, and that's what
Apache::DBI or DBI->connect_cached will take care of for you.

- Perrin

Reply via email to