Skip Menu |

This queue is for tickets about the DBIx-Simple CPAN distribution.

Report information
The Basics
Id: 40535
Status: rejected
Priority: 0/
Queue: DBIx-Simple

People
Owner: Nobody in particular
Requestors: johanl [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.32
Fixed in: (no value)



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
On Do. Okt. 30 12:14:42 2008, JOHANL wrote: Show quoted text
> 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;
This would have a big negative impact on performance and maintainability. However, it's probably a good idea to at least add a warning to DBIx::Simple's documentation. Thanks for reporting this deficiency. -- Juerd