Closed GoogleCodeExporter closed 9 years ago
The problem happens earlier, when we open the scalar DATA fh.
do_open:
if (result == EOF && fd > PL_maxsysfd)
=> Warning: unable to close filehandle %s properly
Original comment by reini.urban
on 2 May 2014 at 2:24
Actually any read of <DATA> in code breaks this way now. This is all you need.
to reproduce the problem.
package foo;
sub dada {
my $line = <DATA>
}
1;
__DATA__
a
b
c
Original comment by todd.e.rinaldo
on 7 May 2014 at 3:24
Fixed with commit 28f994c62207fc24806f04242a6adf3775116a68
Author: Reini Urban <rurban@cpanel.net>
Date: Thu May 8 14:11:21 2014 -0500
C: Support __DATA__ blocks in packages without printing wrong warnings (#310)
Fixes issue 310
Pass a flag to IO::save if it is a __DATA__ fh. So far we only checked for main::DATA.
This fixes the wrong Warning: unable to close filehandle DATA properly when opening
the PerlIO::scalar __DATA__ fh a second time, and also the wrong
Read BEGIN-block $fullname from FileHandle $iotype warning.
Original comment by reini.urban
on 8 May 2014 at 7:22
This issue was closed by revision 28f994c62207.
Original comment by reini.urban
on 8 May 2014 at 10:49
Original issue reported on code.google.com by
reini.urban
on 30 Apr 2014 at 7:43