in reply to explicitly calling destructor

You don't need to call the DESTROY method explicitly. Make an unlock() method that is called from the DESTROY method. Call unlock() when you know the object (or shouldn't) be used. Make sure that unlock() be called safely twice, like only unlocking if the lock id is stored. If the object can't be used after it is unlocked, then disable it somehow. Blessing it into another class might work but can create problems.

Class::DBI uses the technique of blessing an object into an undefined class after deleting an object. It creates problems because class methods that should continue working like <code>dbi_commit<code> for committing the deletion stop working.