Yes there are a number of ways to do this.
If you are using apache web server they simply do
use Apache::DBI;
rather than
use DBI;
and it will let your reuse session and connections for you
or a longer term approach could be found with
http://search.cpan.org/~mws/ResourcePool-1.0104/lib/ResourcePool.pod
Peter Kopke Jr. wrote:
Hello,
I have a web-based system that accesses a mysql database through DBI.
Currently I make a new database connection for each web access. I
would like to retain the connection and database handle rather than
making a new connection with each web access. Is there a simple way to
do this?
Thanks,
Peter