[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-modperl
Subject: Re: [mp2] $dbh and config values methods
From: Perrin Harkins <perrin () elem ! com>
Date: 2004-05-28 17:30:54
Message-ID: 1085765454.18956.13.camel () localhost ! localdomain
[Download RAW message or body]
On Fri, 2004-05-28 at 02:51, Tom Schindl wrote:
> As Perrin already said Apache::DBI or once more a Singleton-Class
> providing the DBH, although I'd use Apache::DBI because it handles
> everthing for you.
I typically use them together. Apache::DBI handles the persistence, and
the singleton provides easy access from any module that wants to use
it. It also centralizes the db configuration in one spot.
I would caution anyone against rolling their own database handle
persistence system, using simple tricks with globals. It's much better
to use DBI->connect_cached() if you are unable to use Apache::DBI for
some reason.
- Perrin
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic