Subject: | write() hijacks stdout via "select($self->{_fh_})" |
Date: | Sun, 14 Apr 2013 00:21:39 +0200 |
To: | bug-File-RoundRobin [...] rt.cpan.org |
From: | Peter Valdemar Mørch <peter [...] morch.com> |
sub write() selects the $fh, and never re-selects the old stdout. And
for apparently no reason at all.
Therefore, without this patch:
#!/usr/bin/perl -w
use File::RoundRobin;
my $rrfile = File::RoundRobin->new(
path => '/tmp/sample.txt',
size => '100M',
mode => 'new',
);
$rrfile->print("foo bar");
print "this should still go onto stdout, but doesn't\n";
The above snippet doesn't print the above line to stdout as it should but to
$rrfile. :-(
--
Peter Valdemar Mørch
http://www.morch.com
Message body is not shown because sender requested not to inline it.