fix: support filehandles in bundled Tie::File
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
- #1673 của @fglock — đã merge
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Perl
- Star
- 64
- Fork
- 7
- Merge trung bình
- 5 giờ 8 phút
- Pull request đã merge (30 ngày)
- 193
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của fglock/PerlOnJava
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
fglock/PerlOnJava#1651 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
fglock/PerlOnJava#1579 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:cpan-port area:unicode bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
fglock/PerlOnJava#1341 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:runtime bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 58/100
fglock/PerlOnJava#1744 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
HTTP::Cookies extraction drops Expires and SameSite attributesCó thể đã có người làm @fglock đã nhận hôm nay. Đang mởarea:cpan-port bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
fglock/PerlOnJava#1743 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của fglock/PerlOnJava
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Perl/perl5#24942 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
PDLPorters/pdl#561 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
objectionary/eolang.sty#197 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
radiator-software/p5-net-ssleay#577 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
beyondgrep/website#143 ·