I wonder if what you really want to do is to use Tie::FileHandle::MultiPlex. What I would do here is open a new filehandle that duplicates STDOUT or STDERR, then close STDOUT or STDERR, open the logfile(s), and then tie STDOUT or STDERR to the multiplex of the duped filehandle and the logfile.
But more info about PerlIO::via is always a good thing :-)
In reply to Re: writing a PerlIO::via module to log stderr?
by Tanktalus
in thread writing a PerlIO::via module to log stderr?
by DrWhy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |