On Wed, Mar 07, 2001 at 09:49:45AM -0700, Sterin, Ilya wrote:
> 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

Thanks for this idea.  I had thought of opening the file just to check
and then letting DBI->trace reopen it; that didn't appeal to me.

On Wed, Mar 07, 2001 at 05:16:02PM +0000, Tim Bunce wrote:
> Ilya's suggestion is a good one.
>
> The next version of the DBI will at least generate a warn()'ing that
> can be caught using $SIG{__WARN__} if you need to.
>
> Tim.

What happens if the trace logfile becomes unwriteable later in the
program (e.g. disk fills up, or an NFS mounted volume becomes
unavailable)?

Also, it would be nice to have the return value of DBI->trace documented.

Thanks,
-C.

Reply via email to