Tim Bunce wrote:
>
> Jeff, for the time being try just having set_err() also do
> $DBI::err = $h->{err};
> $DBI::errstr = $h->{errstr};
> $DBI::state = $h->{state}; # might need some extra logic here
Yes, that's the way it is. But that way by itself won't pass all of the
Error handling tests in examp.t.
Here's the only way I can pass all of the error tests in examp.t
(including your sneaky test that looks to see if the current or previous
error message is being returned #151):
1. set $DBI::PurePerl::lasth = $h in _setup_handle()
2 set $DBI::PurePerl::lasth->{err} = $_[1] in DBI::var::STORE();
3. return $DBI::PurePerl::lasth->{err} from DBI::var::FETCH()
4. set $DBI::err = $h->{err} in _set_err()
It seems odd that #4 is necessary but it seems to be.
I haven't run into problems with lasth in DESTROY but I'm still testing.
--
Jeff