in reply to Copy an object

It sounds like you should create a couple of subroutines. One for the db connection and one for disconnect (or not). You can return the db handle from the connect sub and use it the same way you would any other. Then call the disconnect when you are done. If you wanted to get really slick, keep the db handle inside your module (ie. don't return it from the connect sub) and provide other subroutines to insert, select, delete, etc... Of course, it depends on how much power you want to allow the users of your module.