Summary
PerlOnJava cannot execute generated executable Perl scripts whose shebang points to $^X. The host falls back to interpreting the script as a shell script, producing use: command not found and shell syntax errors.
Reproduction
Distribution: CLI::Cmdline 1.30
The upstream t/05-integration.t test writes an executable script.pl with:
It then executes the script directly. Under system Perl, all 275 tests pass. Under PerlOnJava, the five parser test files pass, but t/05-integration.t fails 22 of 25 assertions on both backends:
./script.pl: line 2: use: command not found
./script.pl: line 3: use: command not found
./script.pl: line 4: syntax error near unexpected token `('
The resulting exit status is 2 instead of the expected Perl-script results.
The issue reproduces with both the JVM backend and the interpreter backend. The failure is in executable-script/process-launch handling; CLI::Cmdline option parsing itself passes.
CPAN evidence
- CPAN random tester run:
20260907-214651-8410
- Target:
CLI::Cmdline
- Upstream result under system Perl: 275/275 tests passed
- PerlOnJava result: 253/275 passed; 22 failures, all in
t/05-integration.t
Expected behavior
An executable script with a PerlOnJava $^X shebang should be launched by PerlOnJava and execute as Perl, matching system Perl behavior.
Summary
PerlOnJava cannot execute generated executable Perl scripts whose shebang points to
$^X. The host falls back to interpreting the script as a shell script, producinguse: command not foundand shell syntax errors.Reproduction
Distribution:
CLI::Cmdline1.30The upstream
t/05-integration.ttest writes an executablescript.plwith:It then executes the script directly. Under system Perl, all 275 tests pass. Under PerlOnJava, the five parser test files pass, but
t/05-integration.tfails 22 of 25 assertions on both backends:The resulting exit status is 2 instead of the expected Perl-script results.
The issue reproduces with both the JVM backend and the interpreter backend. The failure is in executable-script/process-launch handling;
CLI::Cmdlineoption parsing itself passes.CPAN evidence
20260907-214651-8410CLI::Cmdlinet/05-integration.tExpected behavior
An executable script with a PerlOnJava
$^Xshebang should be launched by PerlOnJava and execute as Perl, matching system Perl behavior.