This queue is for tickets about the File-Tee CPAN distribution.

Report information
The Basics
Id:
128168
Status:
new
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
SREZIC [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
0.07
Fixed in:
(no value)



Subject: STDERR not autoflushed if used in tee()
Normally STDERR is not buffered, but if it is used in tee(), then it does not seem to be buffered at all --- which is surprising at least. Consider the following script: #!/usr/bin/perl use strict; use File::Tee; my $logfile = "/tmp/test.log"; #STDERR->autoflush(1); #File::Tee::tee(\*STDERR, { autoflush => 1, open => $logfile }); print STDERR "Does it work? (y/n) "; <STDIN>; __END__ This is normal behavior --- the prompt appears. If the File::Tee::tee line is activated, then the prompt appears only after hitting RETURN. Workaround is to explictly activate autoflush on STDERR. But again, this is surprising. (Another thing: maybe the documentation might use the more modern ...->autoflush(1) syntax than using the old approach with setting $| and doing a select before and after)


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.