Re: DBI::connect_via (was: OO Architecture)
[email protected] (Honza Pazdziora) Wed, 28 Sep 2005 18:43:59 +0200
| Newsgroups | perl.dbi2.dev |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Sep 28, 2005 at 05:11:40PM +0100, Tim Bunce wrote:
> >
> > if (not defined $DBI::connect_via) {
> > $DBI::connect_via = "connect";
> > }
> >
> > and have Apache::DBI do
> >
> > $DBI::connect_via = "Apache::DBI::connect";
> >
> > Tim, could you spend two lines on why didn't you use this approach?)
>
> I'd happily accept a patch. Could just be
> - $DBI::connect_via = "connect";
> + $DBI::connect_via ||= "connect";
> and some docs, of course :)
I believe we should start with Apache::DBI doing this, and only after
the new version of Apache::DBI is around for a while remove the
Apache::DBI-specific code from DBI. (On the other hand, if it works,
there probably isn't any need to break it.)
> Meanwhile, just have MySite::PersistentDBI "use DBI;" before then
> setting $DBI::connect_via itself.
You're right. Hacking around the hack. ;-)
--
------------------------------------------------------------------------
Honza Pazdziora | [email protected] | http://www.fi.muni.cz/~adelton/
.project: Perl, mod_perl, DBI, Oracle, large Web systems, XML/XSL, ...
Only self-confident people can be simple.