Be careful. Although the other answers here are correct, it is easy to run into trouble if the $dbh you provide is not a subclass of Ima::DBI. For example, calling dbi_commit() on your Class::DBI class will not work with the current release of Class::DBI unless your $dbh is an Ima::DBI subclass.