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 'connected';
                $_[0]->do('SELECT 1 from foo');
                return;
            },
        }
    });

    say 'go';
    $dbh->do('SELECT 1 from foo');

The output is:

    connected
    go
    DBD::SQLite::db do failed: no such table: foo at /Users/david/bin/try line 
22.

That doesn't seem right to me. Shouldn't the connected callback throw an 
exception? IOW, I would not expect "go" to be output.

Best,

David

Reply via email to