Subject: | InputOutput::RequireBriefOpen wants STDIN,STDOUT,STDERR to be closed as soon as possible |
G'day wonderful Perl::Critic maintainers,
Today I discovered that InputOutput::RequireBriefOpen believes that the
special filehandles STDIN, STDOUT and STDERR should be closed as soon as
possible after opening. That doesn't seem right, since these
filehandles may be redirected for a number of reasons, such as writing
errors to a custom logfile[1]:
open(STDERR,'>>','/var/log/my-errors.log');
I believe it should be possible to redirect these standard filehandles
without triggering this rule.
Cheerio,
Paul
[1] Or in my case, dark and terrible magics to implement a
multi-argument, shell-bypassing equivalent of backticks for Win32
systems in IPC::System::Simple.