On Tue, Aug 13, 2002 at 10:22:35PM +0100, Tim Bunce wrote:
> > > But how about a new method:
> > > 
> > >   DBI->connect_method("connect");
> > >   DBI->connect_method("Apache::DBI::connect"); # effectively what "use 
>Apache::DBI;" does now
> > >   DBI->connect_method("connect_cached");
> > 
> > Useful, but doesn't solve the problem.
> 
> Actually it would. I wasn't very clear. The application would do
> 
>       DBI->connect_method("connect_cached");
> and
>       $dbh = DBI->connect(...);

I'm confused.  How, or maybe it's better to ask why, would this be different
than just:

     $dbh = DBI->connect_cached(...);

Why would useing connect_method() make it automagical but connect_cached()
not?


> When not run under Apache::DBI you'd get connection caching via
> connect_cached and when run under Apache::DBI it could ignore the
> connect_method and force Apache::DBI::connect (by default).
> 
> Or just add
> 
>       DBI->connect_method("connect_cached") unless $INC{'Apache/DBI.pm'};
> 
> Would that be okay?

-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl Quality Assurance      <[EMAIL PROTECTED]>         Kwalitee Is Job One
Don't step on my funk

Reply via email to