Nested require loses package for helper subs in List::Vectorize
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Start by comparing this nested dependency load with the caller/package handling and regression coverage added for #1601. Reproduce with ./jcpan -t Statistics::Multtest, then run the focused ./jperl command from the issue on both JVM and interpreter backends. Add a project owned regression test for the minimal nested load, and confirm the reproducer and all 52 unchanged Statistics-Multtest assertions pass.
由索引模型根據 Issue 內容生成。
描述
Summary
Statistics::Multtest 0.14 fails six assertions in t/1prototype.t on the PerlOnJava JVM backend. Its initial routine calls List::Vectorize::is_array_ref and List::Vectorize::is_hash_ref, but those functions are not present in the expected package after use Statistics::Multtest loads List::Vectorize and its helper files.
The same distribution and dependencies pass under system Perl. This appears related to package context while loading a nested required Perl file without an explicit package declaration, and may be a remaining case in the nested-require caller/package handling addressed by #1601. The small reproducer below fails in the current checkout.
Reproduction
Install Statistics::Multtest 0.14 and its List::Vectorize dependency, then load them through the distribution's normal module path:
./jcpan -t Statistics::Multtest
The failing calls can be isolated after the distributions are installed:
./jperl \
-I<Statistics-Multtest-blib-lib> \
-I<List-Vectorize-blib-lib> \
-e 'use Statistics::Multtest; Statistics::Multtest::initial([0.1])'
On the JVM backend this dies with:
Undefined subroutine &List::Vectorize::is_array_ref called
In List::Vectorize 1.05, is_array_ref is defined in List/Vectorize/lib/Datatype.pl. That file has no package declaration; it is loaded by List::Vectorize.pm using require. With List::Vectorize loaded directly in a top-level one-liner, the symbol is present, but when loaded as a dependency of Statistics::Multtest, it is absent from List::Vectorize's package.
Evidence
- Distribution/version:
Statistics-Multtest0.14; dependencyList-Vectorize1.05. - Archived CPAN run:
20261117-092012-89323. - PerlOnJava JVM backend: 46/52 assertions passed; six failures (tests 1, 3, 5, 7, 9, and 11) in
t/1prototype.t, all failing at the undefinedList::Vectorize::is_array_refcall inStatistics::Multtest::initial. - System Perl oracle from the same run:
Statistics-Multtestpassed all 52 tests;List-Vectorizepassed all 643 dependency tests. - No XS/native dependency is involved.
- The isolated reproducer was run on the JVM backend. Interpreter behavior has not yet been checked.
Expected behavior
Loading List::Vectorize as a dependency should define its helper functions in List::Vectorize, so Statistics::Multtest::initial can validate array and hash references as it does under system Perl.
Related issue
This may be an additional package-context case related to #1601 (nested require caller context). The focused Statistics::Multtest reproducer above still fails in the current checkout and should be compared against the regression coverage added for that issue.
Acceptance criteria
- Add a project-owned regression test for the minimal nested dependency load and validate its expected behavior under system Perl.
- Make the focused reproducer pass on both JVM and interpreter backends.
- Rerun the unchanged
Statistics-Multtest0.14 test suite and confirm all 52 assertions pass.
- 主要語言
- Perl
- 星號
- 67
- 分支
- 8
- 平均合併
- 5 小時 12 分鐘
- 30 天內合併 PR
- 131
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
fglock/PerlOnJava 的其他 Issue
-
area:cpan-port bug
難度 2/5 1-3 小時 新手友好度 70/100
fglock/PerlOnJava#2153 ·
維護者通常 1 天內回覆
-
area:cpan-port area:parser bug
難度 2/5 1-3 小時 新手友好度 68/100
fglock/PerlOnJava#2137 ·
維護者通常 1 天內回覆
-
area:backend area:cpan-port area:runtime bug
難度 2/5 1-3 小時 新手友好度 76/100
fglock/PerlOnJava#2071 ·
維護者通常 1 天內回覆
-
area:runtime documentation enhancement
難度 2/5 1-3 小時 新手友好度 72/100
fglock/PerlOnJava#1579 ·
維護者通常 1 天內回覆
-
area:cpan-port bug
難度 3/5 1-2 天 新手友好度 62/100
fglock/PerlOnJava#2157 ·
維護者通常 1 天內回覆
查看 fglock/PerlOnJava 的全部 Issue
相似的 Issue
-
Dev-output directory preparation accepts file-valued lib/include paths and fails on dangling links未關閉team-cli
難度 2/5 1-3 小時 新手友好度 70/100
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 66/100
-
難度 1/5 1 小時以內 新手友好度 93/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 73/100
inverse-inc/packetfence#9728 ·
維護者通常 1 天內回覆
-
fix(char-create): show the real reason a character is refused可能已有人在做 @baphomello 於 1 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 84/100
維護者通常 1 天內回覆