Perl: the Markov chain saw | |
PerlMonks |
DBD::mysql warns *and* dies?by Ovid (Cardinal) |
on Jul 18, 2006 at 12:22 UTC ( [id://561989]=perlquestion: print w/replies, xml ) | Need Help?? |
Ovid has asked for the wisdom of the Perl Monks concerning the following question: I'm writing some code which, amongst other things, utilities MySQL server-side prepare statements to ensure the validity of chunks of SQL. However, I have to wrap the prepare in an eval because it dies when it encounters bad SQL:
Well, that seems pretty reasonable, except for one tiny problem. I trap the exception, but it still gets sent to STDERR unless I do this:
Why the heck do I need to do that? Am I have a total brain-cramp and missing something obvious here? A complete example of how I'm doing this is below, though I think all of the relevant bits are above.
Cheers, New address of my CGI Course.
Back to
Seekers of Perl Wisdom
|
|