You want the ping method of the connection handle,
If you would like to make this automatic, with no connection made until the handle is used, and no other alteration to existing code, see my Lazy DBI Connection Handles.if ( not $dbh->ping ) { $dbh = my_reconnect() }
After Compline,
Zaxo
In reply to Re: check if DBI is still connected
by Zaxo
in thread check if DBI is still connected
by b888
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |