We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A localized installation of a HandleError handler remains active even after exiting the localizing block. See test below (perl 5.32.0, DBI v1.643).
use strict; use warnings; use Test::More; use DBI; run_tests(SQLITE => DBI->connect('dbi:SQLite:dbname=:memory:', '', '', {RaiseError => 1})); run_tests(CSV => DBI->connect('dbi:CSV:', '', '', {f_ext => "foo.csv", RaiseError => 1})); sub run_tests { my ($db_name, $dbh) = @_; eval {my $bug = $dbh->prepare("BAD SQL")}; unlike $@, qr/FROM HandleError/, "$db_name: HandleError not installed yet"; { local $dbh->{HandleError} = sub {die shift . " FROM HandleError"}; eval {my $bug = $dbh->prepare("BAD SQL")}; like $@, qr/FROM HandleError/, "$db_name: HandleError installled"; } eval {my $bug = $dbh->prepare("BAD SQL")}; unlike $@, qr/FROM HandleError/, "$db_name: HandleError should no longer be active"; } done_testing;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
A localized installation of a HandleError handler remains active even after exiting the localizing block.
See test below (perl 5.32.0, DBI v1.643).
The text was updated successfully, but these errors were encountered: