samtregar has asked for the wisdom of the Perl Monks concerning the following question:
DBD::mysql::db selectcol_arrayref failed: Unknown error at ...
I can catch it with $SIG{__WARN__} but I'm having a hard time figuring out where it's coming from. I tried sticking a call to Devel::StackTrace in a $SIG{__WARN__} handler, but that didn't show me a source. I also tried greping DBD::mysql and DBI for the warning text, without luck.
Any ideas about how I can find the source of this warning?
UPDATE: I found the source of the warning. The DBI PrintError attribute was set on, and amazingly can't be turned off after connect(). Trying to set this attribute to 0 turns it on as surely as 1. Remind me again why DBI had to reimplement hashes?
UPDATE 2: Ok, it seems you can turn PrintError off, but connect_cached() will turn it back on. Stills seems wrong, but less wrong than not being able to turn it off at all.
-sam
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tracing a warning
by bart (Canon) on Sep 18, 2006 at 18:13 UTC | |
|
Re: Tracing a warning
by Ovid (Cardinal) on Sep 18, 2006 at 18:14 UTC | |
|
Re: Tracing a warning
by Anonymous Monk on Sep 19, 2006 at 07:16 UTC |