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.
On Tue, 14 Dec 2004 10:12:54 +0100, Steffen Goeldner <[EMAIL PROTECTED]> wrote: > DBI 1.31 suggests that lexically scoped variables should > be passed to _new_dbh(): > > > <http://search.cpan.org/~timb/DBI/Changes#Changes_in_DBI_1.31,_29th_November_2002> > > DBI 1.33 suggests that drivers should no longer pass these > variables to _new_drh() or _new_dbh(): > > > <http://search.cpan.org/~timb/DBI/Changes#Changes_in_DBI_1.33,_27th_February_2003> > > This leaves set_err() as the sole interface to set error > codes. > > But "The Perl DBI Database Driver Writer's Guide" still > suggests that global $err/$errstr/$state variables are > needed for DBI: > > <http://search.cpan.org/~timb/DBI-1.46/lib/DBI/DBD.pm#The_header> > > IMO, we can discard the paragraph without substitution. > > > Steffen > > > Index: lib/DBI/DBD.pm > =================================================================== > --- lib/DBI/DBD.pm (revision 623) > +++ lib/DBI/DBD.pm (working copy) > @@ -569,21 +569,8 @@ > package DBD::File; > > use strict; > - use vars qw($err $errstr $state $drh); > + use vars qw($VERSION $drh); > > - $err = 0; # holds error code for DBI::err > - $errstr = ""; # holds error string for DBI::errstr > - $sqlstate = "S1000"; # holds SQL state for DBI::state > - > -These variables are used for storing error states and messages. > -Note that most pure Perl drivers do not support the SQL standard error > -indicator SQLSTATE, and for such drivers, the value "S1000" is > -appropriate. > -If your database does support SQLSTATE, then initialize $sqlstate to an > -empty string. > -However, it is crucial to understand that you must not modify them > -directly; see below. > - > $VERSION = "1.23.00" # Version number of DBD::File > > This is where the version number of your driver is specified. > > > -- Jonathan Leffler <[EMAIL PROTECTED]> #include <disclaimer.h> Guardian of DBD::Informix - v2003.04 - http://dbi.perl.org "I don't suffer from insanity - I enjoy every minute of it."