In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/cc4d3128555c2fbf5af7fc75854461cd87502812?hp=2ebde1ca18ddaa314fe6d25c75315d1019fd91b5>
- Log ----------------------------------------------------------------- commit cc4d3128555c2fbf5af7fc75854461cd87502812 Author: David Mitchell <[email protected]> Date: Wed Mar 23 16:11:01 2016 +0000 improve perldiag implicit close text ----------------------------------------------------------------------- Summary of changes: pod/perldiag.pod | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/pod/perldiag.pod b/pod/perldiag.pod index d72b8bd..fd91cd4 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -7095,8 +7095,21 @@ space. =item Warning: unable to close filehandle %s properly: %s -(S io) An error occurred when Perl implicitly closed a filehandle. This -usually indicates your file system ran out of disk space. +(S io) Prior to version 5.22.0, perl silently ignored any errors when +doing an implicit close of a filehandle, I<i.e.> where the reference count +of the filehandle reached zero and the user's code hadn't already called +<close(); for example, + + { + open my $fh, '>', $file or die "open: '$file': $!\n"; + print $fh $data or die "print: $!"; + } # implicit close here + +Due to buffering, in a situation such as disk full the error may only be +detected during the final close, so not checking the result of the close +is dangerous. + +So perl now warns in such situations. =item Warning: Use of "%s" without parentheses is ambiguous -- Perl5 Master Repository
