> So, Tim, what *are* the differences, and when should we should we
> choose Apache::DBI vs DBI->connect_cached, and why?

I think one of the big differences is that Apache::DBI overrides the
disconnect method, to prevent accidentally calling disconnect from a
mod_perl script. When using connect_cached you have to watch out for this
yourself.

Also, I had to switch from using Apache::DBI to connect_cached in my
Apache::Registry script because of another subtle difference...

(from Apache::DBI)
# The PerlCleanupHandler is supposed to initiate a rollback after the script
has finished if AutoCommit is off.
# Note: the PerlCleanupHandler runs after the response has been sent to the
client

My registry script was using AutoCommit=0 and trying to commit via an END
block, but Apache::DBI was rolling back before the END block was executed.
Took a while to track this down.

Chris

---------------------------------------------------------------------
      Chris Nokleberg          +   Internet Sports Network, Inc.
      [EMAIL PROTECTED]   +   http://www.SportsRocket.com/

Reply via email to