>I want my debug output to go in the same place as my Postgresql log file so
>they are chronologically mingled.
>I have a req->dbug routine that appends info to a text file but it opens
and
>closes the file each call.
>I want to open the file in append mode and keep it open in cache like the
>Postgres database is kept open in cache.
>Can I do this?

Open the file with FileHandle -> open so you get it in a scalar, then you
can either save it in the application object and only call open if it's
undef e.g.

$req->app->{fh} ||= FileHandle -> open (  ) ;

You may also you a global variable for saveing your filehandle, which must
be either in another namespace, so it's not cleaned up by Embperl or it's
name muts be added to %CLEANUP with value 0.

Gerald



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to