Jonathan Leffler wrote:
On Tue, 14 Dec 2004 16:47:39 +0000, Tim Bunce <[EMAIL PROTECTED]> wrote:
On Tue, Dec 14, 2004 at 07:08:08AM -0800, Jonathan Leffler wrote:
I had certainly managed to miss this change - which could easily account for some of the weirdnesses I'd been seeing in DBD::Informix. (I haven't had a chance to do a thing for a week and more.) This sort of backwards incompatible change (in the use of set_err()) stuff needs to be firmly highlighted. I hope it was and I simply missed it. I would have put in place a comment about legacy drivers no longer being good exemplars.
I don't think the change is backwards incompatible. It's a change in 'best practice' that ensures that errors on one db handle don't also appear on other children of the same handle.
OK - well, I've removed the Err, Errstr, State parameters from the calls to _new_drh and _new_dbh and things seem to be working better for me in DBD::Informix..
That's nice (particularly with regard to the fact that I merely submitted a POD patch)!
Today's patch removes some unused $err variables from some DBD's.
Steffen
Index: lib/DBD/NullP.pm =================================================================== --- lib/DBD/NullP.pm (revision 624) +++ lib/DBD/NullP.pm (working copy) @@ -14,7 +14,6 @@ # License or the Artistic License, as specified in the Perl README file. $drh = undef; # holds driver handle once initialised - $err = 0; # The $DBI::err value sub driver{ return $drh if $drh; Index: lib/DBD/Sponge.pm =================================================================== --- lib/DBD/Sponge.pm (revision 624) +++ lib/DBD/Sponge.pm (working copy) @@ -15,7 +15,6 @@ # License or the Artistic License, as specified in the Perl README file. $drh = undef; # holds driver handle once initialised - $err = 0; # The $DBI::err value my $methods_already_installed; sub driver{ Index: lib/DBD/ExampleP.pm =================================================================== --- lib/DBD/ExampleP.pm (revision 624) +++ lib/DBD/ExampleP.pm (working copy) @@ -32,7 +32,6 @@ die unless @statprec == @stattypes; $drh = undef; # holds driver handle once initialised - $err = 0; # The $DBI::err value #$gensym = "SYM000"; # used by st::execute() for filehandles sub driver{ Index: lib/DBD/Proxy.pm =================================================================== --- lib/DBD/Proxy.pm (revision 624) +++ lib/DBD/Proxy.pm (working copy) @@ -31,7 +31,7 @@ package DBD::Proxy; -use vars qw($VERSION $err $errstr $drh %ATTR); +use vars qw($VERSION $drh %ATTR); $VERSION = "0.2004";