On Thu, Nov 14, 2013 at 02:07:41PM -0800, David E. Wheeler wrote:
On Nov 14, 2013, at 9:17 AM, David E. Wheeler da...@justatheory.com 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
On Nov 15, 2013, at 3:12 AM, Tim Bunce tim.bu...@pobox.com wrote:
You'd need to write the callback code in the way you'd naturally write
it when not using RaiseError. Which typically means something like:
$dbh-do('SET search_path = ?', undef, 'foo')
or return;
That will prevent
On Fri, Nov 15, 2013 at 09:14:58AM -0800, David E. Wheeler wrote:
On Nov 15, 2013, at 3:12 AM, Tim Bunce tim.bu...@pobox.com wrote:
You'd need to write the callback code in the way you'd naturally write
it when not using RaiseError. Which typically means something like:
$dbh-do('SET
On Nov 15, 2013, at 10:24 AM, Tim Bunce tim.bu...@pobox.com wrote:
When the method call (which fired the callback) returns, the error
recorded on the handle will trigger RaiseError etc.
Only on 1.630 and higher.
I *always* use RaiseError = 1 (or HandleError). Never ever check return
On Wed, Nov 13, 2013 at 11:22:03AM -0800, David E. Wheeler wrote:
DBIers,
Given this script:
use v5.18;
use warnings;
use utf8;
use DBI;
my $dbh = DBI-connect('dbi:SQLite:', '', '', {
PrintError = 0,
RaiseError = 1,
AutoCommit = 1,
On Nov 14, 2013, at 3:47 AM, Tim Bunce tim.bu...@pobox.com wrote:
So I'll take a guess that you're not using DBI 1.630. (And hope I'm right.)
Yep, I am using 1.628.
I'm wondering, though, if callbacks should not be considered internal calls,
and the outer handle passed to them?
D
On Nov 14, 2013, at 9:17 AM, David E. Wheeler da...@justatheory.com 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
DBIers,
Given this script:
use v5.18;
use warnings;
use utf8;
use DBI;
my $dbh = DBI-connect('dbi:SQLite:', '', '', {
PrintError = 0,
RaiseError = 1,
AutoCommit = 1,
Callbacks = {
connected = sub {
say