fix: preserve Perl arguments in MakeMaker script wrappers

Abierto
#2,157 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
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
62/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
perl, shell
Área
build-system

Línea de trabajo

Start in src/main/perl/lib/ExtUtils/MakeMaker.pm at _shell_fixin and read how the $(PERL) value is interpolated into the exec line of the generated blib/script wrapper. Reproduce by building a small distribution whose PERL is set to an interpreter path plus -Iinc (ideally with a space in the path), then check whether the staged wrapper under blib/script runs. Done means the wrapper invokes the interpreter and its arguments correctly, and a regression test covers both an argument-bearing command and a spaced path. The WWW-Search 2.519 run 20261120-195805-13340 and t/test.t lines 15 and 18 are the reference failure.

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

Descripción

area:cpan-port bug

Summary

ExtUtils::MakeMaker::_shell_fixin generates unusable blib/script wrappers when the configured Perl command includes arguments. This caused the WWW-Search 2.519 CPAN test failure in run 20261120-195805-13340.

Reproduction evidence

The archived PerlOnJava Makefile had PERL set to:

PERL = <jperl-path> "-Iinc"

The generated blib/script/WebSearch wrapper contained the equivalent of:

exec "<jperl-path> "-Iinc"" -w "$dir/.WebSearch.perlonjava" "$@"

Because _shell_fixin wraps the entire $(PERL) string in double quotes, the shell treats <jperl-path> -Iinc as one executable name. The shell reports that this command cannot be found. AutoSearch receives the same malformed wrapper.

WWW::Search::Test::find_websearch() probes WebSearch --VERSION; the failed wrapper makes it return false. The first-time and memoized-result checks then fail at t/test.t lines 15 and 18. The failure is in generated command quoting; the test does not require a live search service.

Results

  • Distribution: WWW-Search 2.519.
  • PerlOnJava JVM backend: 149/151 subtests passed; t/test.t failed 2/5 checks because the generated WebSearch wrapper could not execute.
  • Standard Perl: the archived oracle run passed the complete distribution suite, including t/test.t (151 subtests in the PerlOnJava run; standard Perl harness reported all 10 test programs successful).
  • PerlOnJava interpreter backend: not tested.
  • The affected code is src/main/perl/lib/ExtUtils/MakeMaker.pm, helper _shell_fixin, which currently embeds the complete $(PERL) value as a quoted executable instead of preserving it as a command with arguments.

Expected behavior

Generated script wrappers must invoke the configured Perl command correctly when it contains interpreter arguments such as -Iinc. Add focused regression coverage for a path with spaces or command-line arguments, and verify the wrapper can execute a staged script from blib/script.

Verification context

The PerlOnJava failure is archived under CPAN random tester run 20261120-195805-13340, distribution WWW-Search 2.519, failing test t/test.t. The standard Perl oracle result for the same distribution is PASS.

Lenguaje dominante
Perl
Estrellas
67
Forks
8
Merge medio
5 h 12 min
PR fusionados (30 d)
131

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.