Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

fix: support filehandles in bundled Tie::File

クローズ
#1,578 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

関連するプルリクエストがすでにマージされています。

  • #1673 @fglock による — マージ済み

評価

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

調査の方向性

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 の本文から書いたものです。

説明

bug

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 are undef
  • t/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::File arrays to writable filehandles as well as pathnames.
  • Add a tracked regression test covering the filehandle form.
  • Verify the upstream AI::ConfusionMatrix CSV suite on both PerlOnJava backends.
主要言語
Perl
スター
64
フォーク
7
平均マージ
5時間 6分
マージ済み PR(30日)
200

環境構築

はじめの一歩

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

fglock/PerlOnJava のほかの issue

fglock/PerlOnJava の issue をすべて見る

似ている issue

Perl の issue をもっと見る

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

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