Parser does not stop at __END__ with trailing text (File::Remote 1.17)

オープン 初心者向け
#2,137 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

まだ誰も着手していません。

評価

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

調査の方向性

最小の再現コードから始める: 1; に続けて __END__ DATA と無視されるテキストを含むファイルを用意し、./jperl で実行してシステムの Perl と比較する。次に、blib/lib/File/Remote.pm の 914 行目と test.pl を使って報告された失敗を再現する。パーサーがどこで __END__ を認識するかを見つけ、終端が同じ行の後続テキストに依存しないようにする。最小ファイルと File::Remote の両方が構文エラーなしで読み込めれば完了。

索引モデルが issue の本文から書いたものです。

説明

area:cpan-port area:parser bug

Module

  • Distribution: File-Remote 1.17
  • CPAN tester report: syntax error, 2026-11-14
  • System Perl: /usr/bin/perl 5.34.1 on macOS arm64; perl Makefile.PL && make test passes (1 test).
  • PerlOnJava: timeout 120 ./jperl -Iblib/lib -Iblib/arch test.pl fails while loading the module:
    syntax error at blib/lib/File/Remote.pm line 914, near "DATA"

Reproducer and cause

The final documentation marker in Remote.pm is __END__ DATA (line 914). Perl treats __END__ as the end of source and ignores the remainder of that line and file. PerlOnJava instead continues parsing DATA as Perl code and emits a syntax error. This is a source-boundary recognition bug, not invalid module syntax.

A minimal reproduction is a source file containing:

1;
__END__ DATA
this is ignored by Perl

System Perl compiles it; PerlOnJava should also stop parsing at __END__ even when trailing text is present.

Expected

Loading File::Remote succeeds, matching standard Perl. The parser should treat __END__ as a source terminator independent of trailing same-line text.

主要言語
Perl
スター
67
フォーク
8
平均マージ
5時間 12分
マージ済み PR(30日)
131

環境構築

はじめの一歩

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

fglock/PerlOnJava のほかの issue

fglock/PerlOnJava の issue をすべて見る

似ている issue

Perl の issue をもっと見る

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

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