MooseX::Getopt help exits without printing usage text
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- perl
- 领域
- cli, testing-qa
调研方向
在两个 PerlOnJava 后端上运行 t/104_override_usage.t 和 t/109_help_flag.t,然后跟踪成功退出时共享的 stdout 缓冲或 Test::Trap 捕获。比较帮助和未知选项路径。完成的标准是:help、usage 和短别名以 exit 0 退出,usage 文本输出到 stdout,没有 stderr 输出,并且聚焦的回归覆盖在两个后端上都通过。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Perl
- 星标
- 64
- 派生
- 7
- 平均合并
- 5 小时 8 分钟
- 30 天内合并 PR
- 193
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
fglock/PerlOnJava 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
fglock/PerlOnJava#1651 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
fglock/PerlOnJava#1579 ·
维护者通常 1 天内回复
-
area:cpan-port area:unicode bug
难度 2/5 1-3 小时 新手友好度 88/100
fglock/PerlOnJava#1341 ·
维护者通常 1 天内回复
-
area:runtime bug
难度 4/5 3-5 天 新手友好度 58/100
fglock/PerlOnJava#1744 ·
维护者通常 1 天内回复
-
HTTP::Cookies extraction drops Expires and SameSite attributes可能已有人在做 @fglock 今天认领。 未关闭area:cpan-port bug
难度 3/5 1-2 天 新手友好度 35/100
fglock/PerlOnJava#1743 ·
维护者通常 1 天内回复
查看 fglock/PerlOnJava 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
PDLPorters/pdl#561 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
objectionary/eolang.sty#197 ·
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
radiator-software/p5-net-ssleay#577 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
beyondgrep/website#143 ·