[Catalyst] do I need to load Apache::DBI?

Matt S Trout dbix-class at trout.me.uk
Mon Jul 30 19:13:00 GMT 2007


On Mon, Jul 30, 2007 at 11:04:27AM -0400, Perrin Harkins wrote:
> On 7/24/07, Matt S Trout <dbix-class at trout.me.uk> wrote:
> > Apache::DBI is an awful hack and should be avoided where possible.
> 
> Kind of an exaggeration.  Apache::DBI is a useful module for porting
> existing CGI scripts to mod_perl.  If you aren't porting CGI scripts
> to mod_perl, you

... don't need an awful hack to get a persistent DB connection :)

I used to consider it a neat hack. After some time with the internals,
some fun explicitly disabling it within DBIC since it sometimes broke our
reconnect code, and even then discovering I could often solve client mod_perl
problems by removing the line that loaded it from httpd.conf, I reclassified
it was 'awful'.

So from where I'm standing, it's not an exaggeration at all.

I guess if you're not using something with smart reconnect logic like
DBIC, it's a different matter. I can't figure out where the equivalent code
is in RDBO so I've no idea how intelligent it is.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director    Want a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/                    http://www.shadowcat.co.uk/ 



More information about the Catalyst mailing list