in reply to Using a single database handle or multiple handles

Does it matter either way?

Of course it matters, but that's application specific.

What zwon says, and then:

Then you might have long running tasks. Could there be time-outs? Does your application fork? and so on...

  • Comment on Re: Using a single database handle or multiple handles

Replies are listed 'Best First'.
Re^2: Using a single database handle or multiple handles
by erix (Prior) on Oct 11, 2012 at 15:32 UTC

    If your subs comprise transactions and you need to close the connection after each, you would let the sub set up the connection.

    This seems a somewhat strange procedure, or construction. Transactions are committed or rolled back by telling the database to COMMIT or ROLLBACK (and dbi can do either), not by closing the connection...