Not sure if that will help your case, but you can open the file yourself and
then assign the file handle to STDERR, that way you can check for the file
open yourself.
if (open(FILE, "file_name"))
{
*STDERR = *FILE;
DBI->trace(2);
}
Ilya Sterin
-----Original Message-----
From: Colin Meyer
To: [EMAIL PROTECTED]
Sent: 03/06/2001 9:38 PM
Subject: success of DBI->trace() calls?
DBI'ers:
Is it possible to programmatically check on the success of a call to
DBI->trace() or $h->trace()?
For example, I'd like to know when I have called
DBI->trace(1, '/file/that/I/cant/write/to.log').
Experimentation (not documentation) shows that the return value of
trace()
seems to be the previous tracelevel rather than the usual true/false
error indicator. When passed a logfile name that the program doesn't
have write permissions for, trace seems to just write to STDERR, which
isn't always desirable.
Thanks for any help,
-C.