This is something Apache::DBI does. If you want to do it yourself, you could look at that source for ideas. Basically it holds the database handle for you. When you ask for it, it checks (with the $dbh->ping method) to see that it's still alive and reconnects it if necessary before giving it back to you.
In reply to Re: persistent DB connection
by kyle
in thread persistent DB connection
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |