fix: support filehandles in bundled Tie::File
维护者通常 1 天内回复
已经有一个关联 PR 被合并了。
- #1673 来自 @fglock —— 已合并
评估
调研方向
Start by locating the bundled Tie::File implementation and tracing how its second argument is stored, tested, and opened. Add a tracked regression test for tying an array to a writable filehandle, then run t/01_csv.t and t/02_cmData.t for AI::ConfusionMatrix on both the JVM and Interpreter backends; done means the filehandle form works and the upstream suite passes.
由索引模型根据 Issue 内容生成。
描述
Summary
AI::ConfusionMatrix 0.010 cannot read CSV output through the bundled Tie::File when the caller supplies an open filehandle. Upstream Tie::File accepts this supported usage, but PerlOnJava's bundled shim treats the handle as a filename and produces an empty tied array.
CPAN evidence
Archived CPAN random-tester run 20260930-095822-89295 reported AI::ConfusionMatrix as FAIL:
t/01_csv.t: 12 of 13 assertions fail; all expected CSV lines areundeft/02_cmData.t: passes
The relevant upstream suite passes unchanged under system Perl: 2 files and 19 tests, all successful.
The focused failing test reproduces on both PerlOnJava execution backends:
- JVM backend: 12 of 13 assertions fail
- Interpreter backend: 12 of 13 assertions fail
Minimal behavior difference
use Tie::File;
use File::Temp 'tempfile';
my $fh = tempfile();
print {$fh} "x\n";
tie my @lines, 'Tie::File', $fh or die $!;
print defined $lines[0] ? $lines[0] : 'undef', "\n";
System Perl prints x; both PerlOnJava backends print undef.
Likely cause
The bundled Tie::File implementation stores its second argument as filename and subsequently applies file tests and open to it. It needs to preserve upstream behavior when that argument is an already-open filehandle.
This distribution is pure Perl; no XS/native port or environmental prerequisite is involved.
Acceptance
- Support tying
Tie::Filearrays to writable filehandles as well as pathnames. - Add a tracked regression test covering the filehandle form.
- Verify the upstream
AI::ConfusionMatrixCSV suite on both PerlOnJava backends.
- 主要语言
- Perl
- 星标
- 64
- 派生
- 7
- 平均合并
- 4 小时 57 分钟
- 30 天内合并 PR
- 203
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
fglock/PerlOnJava 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
fglock/PerlOnJava#1651 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
fglock/PerlOnJava#1579 ·
维护者通常 1 天内回复
-
area:cpan-port area:unicode bug
难度 2/5 1-3 小时 新手友好度 88/100
fglock/PerlOnJava#1341 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 15/100
fglock/PerlOnJava#1795 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 12/100
fglock/PerlOnJava#1794 ·
维护者通常 1 天内回复
查看 fglock/PerlOnJava 的全部 Issue
相似的 Issue
-
Add .gitattributes so share/skel keeps LF on a Windows git checkout可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
PerlDancer/Dancer2#1854 ·
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
major/MySQLTuner-perl#1007 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
-
难度 1/5 1 小时以内 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 69/100
bioconda/bioconda-recipes#70187 ·
维护者通常 2 天内回复