On Wed, Jan 25, 2006 at 02:51:14PM -0500, Steven Lembark wrote:
> 
> 
> -- Tim Bunce <[EMAIL PROTECTED]>
> 
> >>             $dbh->connect_cached( @{ $meta{ $dbh } } );
> > 
> > If the connection has failed then connect_cached() will return a new,
> > different, $dbh which would be lost with the code above.
> > 
> > To change the $dbh in the application to be this new $dbh you'd need to
> > use swap_internal_handle(). If I was mad enough to try this I'd probably
> > do:
> >     $new_dbh = $dbh->clone;
> >     $dbh->swap_internal_handle($new_dbh);
> 
> So much for hacking error handlers in my mail editor :-)
> 
> Why "mad enough"? The point is that if I have a long
> running (months at a time) daemon then it'd be nice
> not to have to restart it each time the databas is
> restarted: just let HandleError deal with it and keep
> on trukin...

Sure, I can certainly understand the motivation. It's just that I
suspect there will be plenty of worms to deal with in this can before
you arrive at a reasonably robust solution.

Tim.

Reply via email to