in reply to Passing Database handles to other modules.
I don't see why you couldn't. You might want your modules to do an isa() check on what was passed in, but other than that, it should be OK to just pass around the database handle. Especially true with using Apache::DBI, since you know the handle will always be open (or if not, that it will be automatically reopened), so there's no worry an underlieing module might try to do something with it after its been disconnected.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
Note: All code is untested, unless otherwise stated
|
|---|