in reply to Setting up Class::DBI classes with existing $dbh
will work for you. I haven't used Exception::Database, however. But i think that will work.package Foo::DBI; use base qw(Class::DBI); use Exception::Database; Foo::DBI->set_db( qw(Main DBI:vendor:database:host user pass), { RaiseError => 1, PrintError => 0, HandleError => sub {Exception::Database->throw($_[0])}, }, ); 1;
UPDATE:
fixed some code typos from cut-n-paste (must preview more ...)
looks like i was wrong ... but i would create a class anyway ... "when in Rome"
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|