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)


Ah, but that's not the same as DBI->err(), DBI->errstr() and DBI->state()...


And you don't need a book to get the above, look at the pod synopsis:

         $rc  = $h->err;
         $str = $h->errstr;
         $rv  = $h->state;

And later on:

       $DBI::err
           Equivalent to "$h->err".

       $DBI::errstr
           Equivalent to "$h->errstr".

       $DBI::state
           Equivalent to "$h->state".

etc...


---------------- Rob Meyer


What is the alternative mechanism for these methods?

$DBI::err, $DBI::errstr, and $DBI::state


Tim.




Reply via email to