Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Nested $^X launch fails after EnvDir -clean clears Java launcher environment

Abierto
#1,465 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java, perl

Línea de trabajo

Start with t/10_envdir_pl.t and bin/envdir.pl, then trace how the nested $^X launcher selects Java when EnvDir -clean changes PATH. Add a regression case for nested $^X after environment cleanup, preserving the requested child environment while ensuring the launcher can find Java; the test should pass on PerlOnJava and standard Perl.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Summary

The EnvDir distribution fails t/10_envdir_pl.t on PerlOnJava when envdir.pl runs a child $^X after loading EnvDir -clean.

Evidence

  • Distribution: EnvDir-0.08
  • Failing test: t/10_envdir_pl.t
  • CPAN run: 20260921-102914-97159
  • Source: CPAN random tester run 20260921-102914-97159
  • PerlOnJava result: 25/26 tests passed; 1/7 test programs failed
  • Standard Perl oracle: all 26 tests passed

The failing test expects:

FOO=foo
PATH=/env/bin

but the child produces no output and reports:

ERROR: PerlOnJava requires Java 24 or later; java was not found in PATH.

Reproduction

bin/envdir.pl uses:

use EnvDir 'envdir', -clean;

EnvDir -clean clears %ENV and sets PATH=/bin:/usr/bin; the test environment then overrides PATH with /env/bin. This removes the inherited PERLONJAVA_JAVA_BIN value. The child $^X is PerlOnJava's launcher shim, which then cannot locate Java and exits before running the requested child code.

The parent launcher works when PERLONJAVA_JAVA_BIN=/usr/bin/java is explicitly preserved, confirming that the failure is in launching a nested PerlOnJava process from a cleaned/restricted environment rather than in EnvDir's normal variable update behavior.

Expected behavior

A PerlOnJava program should be able to invoke $^X after deliberately modifying or cleaning %ENV, as standard Perl does. The nested launcher should retain or otherwise reliably locate the Java executable without requiring java to remain on the child process's modified PATH.

Suggested direction

Make the nested $^X launcher self-contained with respect to Java selection, or arrange for the selected Java path to survive launcher recursion without violating EnvDir -clean's requested child environment semantics. Add a regression test covering a nested $^X invocation after environment cleanup.

Lenguaje dominante
Perl
Estrellas
64
Forks
7
Merge medio
4 h 27 min
PR fusionados (30 d)
178

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de fglock/PerlOnJava

Todos los issues de fglock/PerlOnJava

Issues similares

Más issues de Perl

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.