On Thu, Apr 15, 2010 at 10:07:14AM -0700, David E. Wheeler wrote:
> On Apr 15, 2010, at 5:17 AM, Tim Bunce wrote:
> 
> >    $drh = DBI->install_driver($driver);
> >    $dbh = $drh->connect(...);
> > 
> > Assuming we added a $dbh->connecting() method, how would it be called,
> > and how would the callback have been enabled prior to calling it?
> 
> In connect(), before $connect_meth, just as connected() is called in that 
> method after $connect_meth.
> 
>       $dbh->connected(@orig_args);
>       unless ($dbh = $drh->$connect_meth($dsn, $user, $pass, $attr)) {

$dbh is undef before the $drh->$connect_meth call.

> It's not my needs. Someone is creating a CPAN module I think. His
> needs were met by connected(), but I think that connecting() would be
> useful as well.

Perhaps but it sure seems like a low priority.

> > If we did that (and handled backwards compatibility somewhow)
> > then presumably new_child() could apply the Callbacks attribute
> > which would then fire on the subsequent $dbh->connect call.
> 
> That would be cool. I, alas, have a very short supply of tuits these days.

Ditto.

Tim.

Reply via email to