On Mon, 6 Oct 2003 15:17:09 -0400 (EDT) David N Murray
<[EMAIL PROTECTED]> wrote:

> In my scripts, I use 'or die "cannot connect " . DBI::errstr . "\n";'
> I'm not sure why you're not getting a message, but the above line
> always works for me (note missing $ before 'DBI::'), when I do
> something silly, like mis-spell the database.  The other examples I
> see of errstr usage all have it preceded with a handle, but you don't
> have a handle yet ($dbh->errstr).

I didn't know it would work without the $; you appear to be calling an
undocumented DBI class method.  What I've always used is $DBI::errstr.
That's what is shown in the DBI documentation as an alternative to
$h->errstr.

See http://search.cpan.org/~timb/DBI/DBI.pm#DBI_Dynamic_Attributes

-- 
Mac :})
** I usually forward private questions to the appropriate mail list. **
Ask Smarter: http://www.catb.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.

Reply via email to