> On Tue, Mar 30, 2004 at 08:29:27AM -0500, Robert_Doucette[at]putnam.com wrote: > > > > I have a lot of code using those methods. I did not realize they were not > > standard parts of DBI. > > Can you remember what made you think they were? > > Anybody else out there using them? >
I use them all over the place, too. What made me think they were standard is p. 95 of the Feb. 2000 edition of the Cheetah book, which describes them in quite a bit of detail: "...DBI defines several error diagnostic methods that can be invoked against any valid handle, driver, database, or statement. These methods will inform the programmer of the error code and report the verbose information from the last DBI method called. These are: $rv = $h->err(); $str = $h->errstr(); $str = $h->state(); ..." (_Programming the Perl DBI_, p. 95) ---------------- Rob Meyer > > What is the alternative mechanism for these methods? > > $DBI::err, $DBI::errstr, and $DBI::state > > Tim. > > > Bob Doucette > > > > > > From: Tim Bunce <Tim.Bunce[at]pobox.com> > > 03/29/2004 06:21 AM > > > > > > To: Dean Arnold <darnold[at]presicient.com> > > cc: DBI-users <dbi-users[at]perl.org> > > Subject: Re: DBI->state() > > > > > > > > > > On Sun, Mar 28, 2004 at 01:56:05PM -0800, Dean Arnold wrote: > > > Have the DBI->err(), DBI->errstr(), DBI->state() been > > > deprecated ? I see the err() and errstr() are still > > > in the DBI.pm code, but no trace of state() (as far > > > back as 1.38) > > > > > > FYI: I'm trying to check state info on a connection > > > failure, so I don't have a "handle" to call state() on. > > > > > > Or is the preferred solution to read the $DBI::state > > > variable directly ? > > > > Yes. DBI->err() and DBI->errstr() were never in the spec > > and they'll be removed in DBI v2. > > > > Tim. > > > > > > > >
