In perl.git, the branch sprout/destroio has been created
<http://perl5.git.perl.org/perl.git/commitdiff/628daf8614784f105451dd392c56bc40947d4c34?hp=0000000000000000000000000000000000000000>
at 628daf8614784f105451dd392c56bc40947d4c34 (commit)
- Log -----------------------------------------------------------------
commit 628daf8614784f105451dd392c56bc40947d4c34
Author: Father Chrysostomos <[email protected]>
Date: Wed Jul 3 08:48:23 2013 -0700
[perl #57512] Warnings for implicitly closed handles
If the implicit close() fails, warn about it, mentioning $! in the
message. This is a default warning in the io category.
When compiling with -Accflags=-DPERL_NOISY_IO_DESTROY the warning
âHandle implicitly closedâ applies to any handle that is successfully
implicitly closed. Enabling this warning in general provides obnox-
iously verbose output, since this practice is so widespread. I
thought leaving it in might be useful as a tool to make the core Perl
code more robust against I/O errors. It probably should not be docu-
mented, as such a tool for general use is better implemented as in a
CPAN module that overrides IO::Handle::DESTROY.
This currently produces warnings for code like this:
my $pid = open my $fh, "| perl -e0";
waitpid $pid, 0;
close $fh or die $!;
__END__
Output:
No child processes at - line 3.
Iâm not so sure that should warn. I am not sufficiently versed in
I/O to know when we do and do not want to warn, so I cannot proceed
much further with this.
-----------------------------------------------------------------------
--
Perl5 Master Repository