Text::CSV::csv fails with bundled Text::CSV_XS shim
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by reading the bundled Text::CSV_XS shim and the Text::CSV wrapper’s direct backend call. Add a focused regression test for Text::CSV::csv; confirm it fails on the unfixed parent and passes under standard Perl and both PerlOnJava backends. Then run WHO-GrowthReference-Table 0.013’s t/00-compile.t on both backends and confirm it passes.
由索引模型根据 Issue 内容生成。
描述
Summary
WHO::GrowthReference::Table 0.013 fails its compile test under PerlOnJava because the bundled Text::CSV_XS compatibility shim does not define a package-level csv function. The failure is reproducible on both the JVM and interpreter backends. The same upstream distribution suite passes under system Perl.
Root cause
The bundled Text::CSV wrapper implements Text::CSV::csv by directly calling the selected backend's package symbol (&{"$backend\::csv"}). When it selects Text::CSV_XS, that requires Text::CSV_XS::csv to exist directly in the package stash.
The PerlOnJava Text::CSV_XS shim inherits from Text::CSV_PP and explicitly installs inherited methods into its own stash so direct symbol lookups work. Its export/alias block includes methods such as version, error_diag, and the CSV constants, but omits csv. Inheritance alone does not satisfy the wrapper's direct symbolic call, so the invocation dies with:
Undefined subroutine &Text::CSV_XS::csv called at jar:PERL5LIB/Text/CSV.pm line 97.
WHO::GrowthReference::Table calls Text::CSV::csv in compile-time data initialization. Therefore its t/00-compile.t fails while loading the module.
Reproduction
A minimal reproducer is:
use Text::CSV;
my $rows = Text::CSV::csv(in => "a,b\n");
On PerlOnJava source commit 36d061932880b125578ca915c78613ce469b1675, this fails with the undefined Text::CSV_XS::csv error on both backends:
timeout 60 ./jperl -e 'use Text::CSV; my $x = Text::CSV::csv(in => "a,b\n"); print scalar(@$x), qq(\\n)'
timeout 60 ./jperl --interpreter -e 'use Text::CSV; my $x = Text::CSV::csv(in => "a,b\n"); print scalar(@$x), qq(\\n)'
Both exit 255 with the same error. Under system Perl, the archived CPAN oracle passed the complete WHO::GrowthReference::Table 0.013 test suite: 5 test programs, 1 assertion, all successful.
CPAN evidence
- Distribution:
WHO-GrowthReference-Table0.013 (WHO::GrowthReference::Table) - CPAN random tester run:
20261118-104825-43075 - Failing test:
t/00-compile.t(WHO/GrowthReference/Table.pm loaded ok) - PerlOnJava result: 1 of 5 test programs failed; the remaining four were author/release tests skipped by the distribution.
- System Perl oracle: all 5 test programs passed (1 assertion).
- Runtime prerequisites used by the failing run:
Data::Section::Seekable::Reader0.092 andData::TableData::Lookup0.003; both dependency test suites passed under the system Perl oracle. - Reproduction environment: macOS 26 / Darwin 25.6, ARM64, OpenJDK 24.0.2, PerlOnJava Perl 5.44.1.
The closedir() warning in the archived log is unrelated; the test's fatal error is the missing Text::CSV_XS::csv symbol.
Acceptance criteria
- The bundled
Text::CSV_XSbackend exposescsvas a package-level function compatible withText::CSV::csv's direct backend call. - Add a focused project regression test for the
Text::CSV::csvfunctional interface. - Validate the new test with standard Perl, retain evidence that it fails on the unfixed PerlOnJava parent, and verify it passes on both JVM and interpreter backends.
- Re-run
WHO-GrowthReference-Table0.013t/00-compile.ton both PerlOnJava backends.
- 主要语言
- 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 天内回复