>
> Okay, there seems to be some confusion here.
>
> Ultimately the only access to a handle's err, errstr, and state are
> through method calls on the *handle* (the object reference):
>
> $h->err
> $h->errstr
> $h->state
>
> As a convienience the DBI also provides these *tied* variables
>
> $DBI::err
> $DBI::errstr
> $DBI::state
>
> when you access $DBI::err, for example, the FETCH method of
> the tied variable is called and that calls the err() method
> on the last handle the DBI used.
>
> So, having recapped on the background information...
>
> This thread is discussing the undocumented *static* (class) methods
>
> DBI->err
> DBI->errstr
>
> which are simply defined as
>
> package DBI;
> sub err { $DBI::err }
> sub errstr { $DBI::errstr }
>
> No one should be using them. They were never documented.
> Where the documentation refers to $h->err the $h means a *handle*.
> The DBI in DBI->err is not a handle, it's a class name.
>
> For DBI v2 I'll probably leave them but make them issue a warning.
> You have been warned :)
>
> Tim.
Hmmm, I seem to have stirred up a hornets nest...
I'm fairly certain I've seen examples of using that on this list
(tho I'd probably have to download and grep the entire dbi-users
archive to prove it). Probably one of those (initially inocuous)
things that someone posted in an example and it turned into a "virus".
Dean Arnold
Presicient Corp.
www.presicient.com