On Tue, Mar 30, 2004 at 04:21:57PM -0800, Dean Arnold wrote:
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}
]
cc:
Subject:Re: DBI-state
, as documented in the Cheetah Book, is fine. But
those are *handle* methods, and 'DBI' is not a handle. What people
are discussing is the use of DBI-state(), which is wrong, not
$dbh-state() or $sth-state(), which are okay.
--
Keith C. Ivey [EMAIL PROTECTED]
Tobacco Documents Online
http
of directly accessing the
underlying values.
Using the methods, as documented in the Cheetah Book, is fine. But
those are *handle* methods, and 'DBI' is not a handle. What people
are discussing is the use of DBI-state(), which is wrong, not
$dbh-state() or $sth-state(), which are okay
that it was
preferred that we use the methods instead of directly accessing the
underlying values.
Using the methods, as documented in the Cheetah Book, is fine. But
those are *handle* methods, and 'DBI' is not a handle. What people
are discussing is the use of DBI-state(), which is wrong, not
$dbh-state
So, to restate the question again... does anyone use these specific
methods in the DBI class (*not* on handles):
DBI-err
or DBI-errstr
in their code?
Eek, I confess to finding a couple of instances in some of my scripts. But
exclusively after DBI-connect calls though; once
]
cc:DBI-users [EMAIL PROTECTED]
Subject:Re: DBI-state
for these methods?
$DBI::err, $DBI::errstr, and $DBI::state
Tim.
Bob Doucette
From:Tim Bunce [EMAIL PROTECTED]
03/29/2004 06:21 AM
-
From: Tim Bunce
To: [EMAIL PROTECTED]
Cc: DBI-users
Sent: 3/30/04 7:13 AM
Subject: Re: DBI-state()
On Tue, Mar 30, 2004 at 08:29:27AM -0500, [EMAIL PROTECTED]
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
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
() 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
Tim Bunce:
Can you remember what made you think they were?
Anybody else out there using them?
Rob Meyer:
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:
I've
On Mon, Mar 29, 2004 at 12:21:05PM +0100, Tim Bunce wrote:
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
::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
What is the alternative mechanism for these methods?
$DBI::err, $DBI::errstr, and $DBI::state
Tim.
I know we have code that uses $h-errstr(). I assume that is not going
away. These are documented in the DBI pod SYNOPSIS section:
[snip]
$rc = $h-err;
$str = $h-errstr
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
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
17 matches
Mail list logo