DBD::ODBC ping has regressed :-(

Today a long standing Easysoft customer upgraded from DBD::ODBC 1.13 to 1.21 and their scripts stopped working properly :-( It appears they use the ping method to detect whether the connection handle is connected to the database and since upgrading to 1.21 they are getting DBD::ODBC::db ping failed: Cannot allocate statement when disconnected from the database at ./xxx.pl line 11 when calling the ping method after a disconnect.

I finally tracked this down to a change in DBD::ODBC which now refuses to allocate a statement handle if the connection handle is not connected and ping tries to allocate a statement handle. The fix was fairly straight forward since the ping method is implemented in ODBC.pm so it only needed the call to allocate a statement handle wrapping in an eval. However, for some reason I don't know as yet, setting PrintError and RaiseError to 0 via local does not stop the error being printed or raised so until I work this out I've had to change the ping method to:

    sub ping {
        my $dbh = shift;
        my $state = undef;

        my ($catalog, $schema, $table, $type);

        $catalog = "";
        $schema = "";
        $table = "NOXXTABLE";
        $type = "";

        my ($pe, $re) = ($dbh->{PrintError}, $dbh->{RaiseError});
        my $evalret = eval {
            $dbh->{RaiseError} = 0;
            $dbh->{PrintError} = 0;

            # create a "blank" statement handle
            my $sth = DBI::_new_sth($dbh, { 'Statement' => "SQLTables_PING" });
            return 1 if !$sth;

            DBD::ODBC::st::_tables($dbh,$sth, $catalog, $schema, $table, $type)
                  or return 1;
            $sth->finish;
            return 0;
        };
        $dbh->{PrintError} = $pe;
        $dbh->{RaiseError} = $re;
        if ($evalret == 0) {
            return 1;
        } else {
            return 0;
        }
    }

What I don't understand is why "local" is not working for PrintError and RaiseError in the eval. I posted this to dbi-dev here.