fix: preserve Perl arguments in MakeMaker script wrappers

Aberta
#2,157 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
62/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
perl, shell
Domínio
build-system

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Perl
Estrelas
67
Forks
8
Merge médio
5h 12min
PRs com merge (30d)
131

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de fglock/PerlOnJava

Todas as issues de fglock/PerlOnJava

Issues semelhantes

Mais issues de Perl

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.