in reply to Re: How to share DBI connections between objects?
in thread How to share DBI connections between objects?
I'm pretty sure that DBI does pool connections, but i can't prove it.
The connect() method doesn't (unless you're using Apache::DBI). The connect_cached() method does.
Personally I don't like using this sort of thing since it makes it harder to inject things like test databases in a particular context. I prefer to pass in a configuration object to my application that points to the database, that way I can just build custom config objects for testing.