Subject: | Reusing existing $dbh may clash with other modules |
If I reuse the $dbh from a DBIC schema, like this:
my $dbh = $schema->storage->dbh;
and then use it to connect DBIx::Simple, some properties on the $dbh are
wrong.
For example, if anyhing dies in the DBIx::Simple execute(), the DBIC
error handler is used to report the error, and that doesn't work for
some reason.
It would be useful to reset the dbh locally, inside every DBIx::Simple
call (e.g. insert, update, etc), like this:
local $dbh->{HandleError} = undef;
That way the errors are reported properly.
/J