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

Đang mở Phù hợp với người mới
#2,137 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java, perl
Lĩnh vực
compilers

Hướng nghiên cứu

Bắt đầu từ reproducer tối thiểu: một tệp chứa 1; theo sau là __END__ DATA và văn bản bị bỏ qua, chạy nó qua ./jperl và so sánh với Perl hệ thống. Sau đó tái hiện lỗi được báo cáo bằng blib/lib/File/Remote.pm dòng 914 và test.pl. Tìm nơi parser nhận diện __END__ và làm cho việc kết thúc độc lập với văn bản còn lại trên cùng dòng. Hoàn tất khi cả tệp tối thiểu và File::Remote đều tải được mà không có lỗi cú pháp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Perl
Star
67
Fork
8
Merge trung bình
5 giờ 12 phút
Pull request đã merge (30 ngày)
131

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của fglock/PerlOnJava

Tất cả issue của fglock/PerlOnJava

Issue tương tự

Thêm issue về Perl

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.