Say you already have a sub which creates a database handle e.g.
, is there a way to use that when setting up Class::DBI classes? thanks.sub connect { my $dbh = DBI->connect( $dsn, $user, $passwd, {PrintError => 0} ) or Exception::Database->throw($DBI::errstr); $dbh->{HandleError} = sub { Exception::Database->throw($_[0]) }; return $dbh; }
In reply to Setting up Class::DBI classes with existing $dbh by Arunbear
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |