On Nov 14, 2013, at 9:17 AM, David E. Wheeler <[email protected]> wrote:
> The error about "foo" not existing is gone, overridden by the second error
> about "bar" missing. This can lead to hard-to-find bugs. What if the second
> query depended on a condition set up by the first, and the first failed? As a
> user, I would only see the second error, and think that the first statement
> had succeeded. It would take me quite a while to figure out that it had not,
> in fact, succeeded.
I’m also finding it means I can’t do error handling in the callback. I have to
do this to get it to ignore errors:
$dbh->do('SET search_path = ?', undef, 'foo');
$dbh->set_err(undef) if $dbh->err;
I feel a little dirty.
> All of which is to say, your fix in 1.630 certainly improves the situation,
> but since callbacks are really userland code, I think it would be beneficial
> to change callbacks to run in an outer context, with the outer DBI handles
> passed to them. Possible?
This would eliminate all of these problems, no?
Thanks,
David