CPAN compatibility failure
IO::Die 0.057 failed in CPAN run 20260828-172308-14550 (8 of 388 subtests).
The distribution is pure Perl. Focused upstream tests pass on system Perl 5.42, while both PerlOnJava backends reproduce the underlying failures.
Affected behavior
chdir($directory_handle) fails with The fchdir function is unimplemented. System Perl accepts directory handles for chdir.
- Operations on invalid or closed filehandles do not follow Perl error semantics:
read(STDOUT, ...) succeeds even though STDOUT is not readable; IO::Die therefore cannot invoke a subclass's _CREATE_ERROR hook.
binmode($closed_handle) succeeds instead of failing with EBADF.
closedir($closed_handle) throws, but its error string has empty OS_ERROR and EXTENDED_OS_ERROR rather than Bad file descriptor.
chmod($filehandle) does not support the behavior exercised by IO::Die.
The original failures are in t/IO-Die.t: test_CREATE_ERROR, test_binmode, test_chdir, test_chmod, and test_closedir.
Reproducer
use IO::Die;
open my $fh, '<', '/dev/null' or die $!;
close $fh;
IO::Die->binmode($fh);
System Perl dies with a Binmode error containing :raw, layer, and Bad file descriptor. PerlOnJava returns success.
Likewise, this should succeed on a directory handle:
open my $dir, '<', '/' or die $!;
IO::Die->chdir($dir);
PerlOnJava reports fchdir as unimplemented.
Expected fix
Implement handle-based chdir, and make I/O operations consistently detect invalid descriptor state and preserve the correct OS error (EBADF) for wrapper code. Add focused project-owned regression coverage for JVM and interpreter backends.
CPAN compatibility failure
IO::Die0.057 failed in CPAN run20260828-172308-14550(8 of 388 subtests).The distribution is pure Perl. Focused upstream tests pass on system Perl 5.42, while both PerlOnJava backends reproduce the underlying failures.
Affected behavior
chdir($directory_handle)fails withThe fchdir function is unimplemented. System Perl accepts directory handles forchdir.read(STDOUT, ...)succeeds even though STDOUT is not readable;IO::Dietherefore cannot invoke a subclass's_CREATE_ERRORhook.binmode($closed_handle)succeeds instead of failing withEBADF.closedir($closed_handle)throws, but its error string has emptyOS_ERRORandEXTENDED_OS_ERRORrather thanBad file descriptor.chmod($filehandle)does not support the behavior exercised byIO::Die.The original failures are in
t/IO-Die.t:test_CREATE_ERROR,test_binmode,test_chdir,test_chmod, andtest_closedir.Reproducer
System Perl dies with a
Binmodeerror containing:raw,layer, andBad file descriptor. PerlOnJava returns success.Likewise, this should succeed on a directory handle:
PerlOnJava reports
fchdiras unimplemented.Expected fix
Implement handle-based
chdir, and make I/O operations consistently detect invalid descriptor state and preserve the correct OS error (EBADF) for wrapper code. Add focused project-owned regression coverage for JVM and interpreter backends.