Tyler MacDonald wrote:
DBI will replace it, removing all references to the one that failed to ping, and it will go out of scope and get DESTROY'ed.And what if you don't want to reconnect? The possibly still connected, possibly not handle is still left around in {CachedKids}.
Why would you call connect_cached() if you don't want to reconnect?
When is this? DBI checks the handle when you call connect_cached, and if it fails to ping, the old one is replaced in the cache and sent off to garbage collection. If it isn't getting garbage-collected, that probably means you have it in global or closure somewhere.And what if the connect fails?
It's the same as any other connect failure: you get an error message and possibly a croak if you have RaiseError on.
- Perrin
