in reply to check if DBI is still connected
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: check if DBI is still connected
by jamroll (Beadle) on Jun 23, 2017 at 18:17 UTC |