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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to share DBI connections between objects?
by f00li5h (Chaplain) on Mar 27, 2007 at 03:21 UTC | |
by adrianh (Chancellor) on Mar 27, 2007 at 12:38 UTC | |
by f00li5h (Chaplain) on Mar 28, 2007 at 00:21 UTC |