Nested $^X launch fails after EnvDir -clean clears Java launcher environment
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
- Área
- operating-systems
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
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de fglock/PerlOnJava
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
fglock/PerlOnJava#1651 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
fglock/PerlOnJava#1579 ·
Los mantenedores suelen responder en 1 día
-
area:cpan-port area:unicode bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
fglock/PerlOnJava#1341 ·
Los mantenedores suelen responder en 1 día
-
area:backend area:cpan-port area:parser bug
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
fglock/PerlOnJava#1659 ·
Los mantenedores suelen responder en 1 día
-
Alien::Build archive extraction fails for Ninja and MesonPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
fglock/PerlOnJava#1657 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de fglock/PerlOnJava
Issues similares
-
Add IO::Pipe classAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
yuki-kimoto/SPVM-IO#30 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
convos-chat/convos#977 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
inverse-inc/packetfence#9387 ·
Los mantenedores suelen responder en 1 día
-
`-static-libstdc++` breaks buildAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
linux-test-project/lcov#552 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
szTheory/exifcleaner#383 ·
Los mantenedores suelen responder en 1 día