in reply to Passing Database handles to other modules.

The real question is are you using transactions in SQL? if not Apache::DBI can hide a lot of this from your modules. You can get a new handle for each module and let Apache::DBI sort out the optimisation of handle usage.

You need to be careful if you wish to use transactions within you SQL. Both queries in a transaction need to be passed the same handle to work on otherwise you generate two independant transactions.

Hope it helps
UnderMine

  • Comment on Re: Passing Database handles to other modules.