Failure
File::chmod 0.42 fails under PerlOnJava in CPAN run 20260827-102602-1611: 9 of 39 subtests fail across symbolic read, write, executable, sticky-bit, and permission-removal cases.
The module is pure Perl. Its exported chmod subroutine accepts symbolic modes such as +r and converts them to numeric modes before calling CORE::chmod.
PerlOnJava instead compiles an imported bare chmod call as the core numeric opcode. It warns that symbolic values are non-numeric and leaves the mode unchanged.
Minimal reproduction
use File::chmod;
use File::Temp qw(tempfile);
my ($fh, $path) = tempfile();
close $fh;
chmod('+r', $path) or die "chmod: $!";
printf "%04o\n", (stat($path))[2] & 07777;
System Perl prints 0644 (with the module's documented default umask behavior). Both PerlOnJava backends print 0000.
The qualified control works in both PerlOnJava backends:
File::chmod::chmod('+r', $path);
That call prints 0644, confirming that the module implementation and filesystem operation are functional. The defect is resolution/compilation of an imported subroutine whose name matches a core built-in.
Baseline
The upstream File::chmod 0.42 suite passes completely under system Perl: 19 files and 39 tests, with Result: PASS.
Expected behavior
After use File::chmod, an unqualified chmod(...) must dispatch to File::chmod::chmod, as it does in Perl. CORE::chmod(...) must continue to select the core opcode explicitly.
Failure
File::chmod0.42 fails under PerlOnJava in CPAN run20260827-102602-1611: 9 of 39 subtests fail across symbolic read, write, executable, sticky-bit, and permission-removal cases.The module is pure Perl. Its exported
chmodsubroutine accepts symbolic modes such as+rand converts them to numeric modes before callingCORE::chmod.PerlOnJava instead compiles an imported bare
chmodcall as the core numeric opcode. It warns that symbolic values are non-numeric and leaves the mode unchanged.Minimal reproduction
System Perl prints
0644(with the module's documented default umask behavior). Both PerlOnJava backends print0000.The qualified control works in both PerlOnJava backends:
That call prints
0644, confirming that the module implementation and filesystem operation are functional. The defect is resolution/compilation of an imported subroutine whose name matches a core built-in.Baseline
The upstream
File::chmod0.42 suite passes completely under system Perl: 19 files and 39 tests, withResult: PASS.Expected behavior
After
use File::chmod, an unqualifiedchmod(...)must dispatch toFile::chmod::chmod, as it does in Perl.CORE::chmod(...)must continue to select the core opcode explicitly.