MooseX::Getopt help exits without printing usage text
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- perl
- Lĩnh vực
- cli, testing-qa
Hướng nghiên cứu
Chạy t/104_override_usage.t và t/109_help_flag.t trên cả hai backend PerlOnJava, sau đó truy vết việc đệm stdout dùng chung hoặc việc capture bằng Test::Trap xung quanh lần thoát thành công. So sánh các đường dẫn help và tùy chọn không xác định. Hoàn tất khi help, usage và các alias ngắn thoát với exit 0, văn bản usage được ghi ra stdout, không có đầu ra stderr và phạm vi kiểm thử hồi quy tập trung đều đạt trên cả hai backend.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
MooseX::Getopt 0.78 loses help/usage text when help processing exits under PerlOnJava. The failure reproduces on both the JVM and interpreter backends.
Reproduction
This was reported by CPAN random tester run 20260916-111623-23683 in the MooseX::Getopt::Dashes request block. The affected upstream tests are:
t/104_override_usage.t
t/109_help_flag.t
The complete PerlOnJava run reports:
Files=29, Tests=339
9 subtests failed
Focused execution of both affected tests reproduces the same failures on both PerlOnJava backends.
Observed behavior
t/104_override_usage.t fails four assertions. With --help, and with the before/after usage-text modifiers, the captured stdout is empty. The unknown-option case still prints usage successfully.
t/109_help_flag.t fails five assertions. Each of these flags exits with status 0 but produces empty captured stdout:
--help
--usage
--?
-?
-h
The test still observes the expected exit status and no stderr output. Ordinary option parsing and the rest of the distribution’s tests pass.
Expected behavior
System Perl passes the complete upstream suite:
Files=29, Tests=339
All tests successful.
For each help flag, the usage object’s text should be written to stdout before the process exits successfully.
Analysis
This does not appear to be a MooseX::Getopt option-parsing defect: regular options and unknown-option usage output work, and system Perl passes the same tests. The common failure is that help handling calls an otherwise successful exit while the text expected by Test::Trap is absent from captured stdout.
The likely area is shared PerlOnJava handling of stdout buffering/flush behavior around exit, or interaction between that behavior and Test::Trap’s local output capture. The issue affects both execution backends, indicating shared runtime or bundled-library behavior.
Impact
Applications using MooseX::Getopt’s built-in help flags can terminate successfully without displaying their usage information, making command-line interfaces unusable or misleading on PerlOnJava.
Suggested regression coverage
Add a focused project-owned test that invokes a MooseX::Getopt class under both backends with --help (and one short alias), verifies exit status 0, and asserts that the generated usage text is present on stdout and absent from stderr. Also cover output flushing when a successful exit occurs inside a captured-output scope.
- 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 ·