fix: preserve Perl arguments in MakeMaker script wrappers

オープン
#2,157 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
perl, shell
領域
build-system

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Perl
スター
67
フォーク
8
平均マージ
5時間 12分
マージ済み PR(30日)
131

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

fglock/PerlOnJava のほかの issue

fglock/PerlOnJava の issue をすべて見る

似ている issue

Perl の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。