On Sun, May 15, 2011 at 02:36:51PM -0000, Greg Sabino Mullane wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
>
>
> > Is this a defect in DBI or in DBD::Informix (and NullP)?
> > Or is it WAD - Working As Designed?
>
> Not sure when this was added, but on DBD::Pg, an error is
> given, due to this bit of code in dbdimp.c:
>
> if (NULL == imp_dbh->conn)
> croak("execute on disconnected handle");
>
> Which seems like the Right Thing To Do, but I don't know
> how standard that is.
Drivers shouldn't croak() if it can be avoided. The right thing to do is
call set_err_sv() or set_err_char() then return &PL_sv_undef (or whatever's
appropriate for an error).
Tim.