Secondly, we're using the Filter::Handle module to split STDERR to both a logfile and to the terminal. For this I have been using (until switching to Perl-5.8.0) the following code snippet:
I don't want to just tie STDERR to the $LOG_FH filehandle, I want to print to both STDERR and the filehandle.use Filter::Handle qw/subs/; ## $LOG_FH is a FileHandle reference... Filter \*STDERR, sub { local $_ = @_; if (defined $LOG_FH) {print $LOG_FH "STDERR: $_";} $_ }; ## Need a signal handler to capture warnings from carp ## and warn which are not captured by Filter::Handle ## (but by capturing ourselves and printing to STDERR, ## they do get picked up by Filter::Handle)... $SIG{__WARN__} = sub { local $_ = "@_"; print STDERR $_; };
Beginning with Perl-5.8.0, any output to STDERR, either
explicitly or from Perl (e.g. uninitialized variable) results
in a deep recursion error.
Any thoughts about this?? Why is this happening only in Perl-5.8.0?
thanks,
-Cadphile
In reply to Re: Filter::Handle - Deep Recursion Error
by cadphile
in thread Filter::Handle - Deep Recursion Error
by bayruds
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |