Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Test::Unit 0.30 fails on Error.pm catch syntax and example path normalization

未关闭
#1,427 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
perl

调研方向

在 JVM 和解释器后端上运行 Test::Unit 0.30 测试套件,先从 t/tlib/ExceptionChecker.pm 以及测试 t/all_tests.t、t/assert.t 和 t/try_examples.t 开始。跟踪动态 catch ... with 解析失败和示例路径 ./ 的差异,然后添加项目自有的回归测试覆盖。完成标准是 89 个 upstream 测试在两个后端上全部通过,且不修改 upstream 测试。

由索引模型根据 Issue 内容生成。

描述

bug

Summary

The CPAN compatibility run 20260918-141920-96054 reports Test::Unit 0.30 as a failure, although the same upstream distribution passes completely under system Perl.

Reproduction

Run the normal Test::Unit 0.30 test suite with PerlOnJava. The failure affects both the JVM backend and the interpreter backend.

Expected result

System Perl passes all 3 test programs and 89 tests:

  • t/all_tests.t — pass
  • t/assert.t — pass
  • t/try_examples.t — pass

Actual result

PerlOnJava reports 3 failed test programs and 1 failed subtest out of 4:

  1. t/all_tests.t and t/assert.t fail while loading t/tlib/ExceptionChecker.pm:

    Bareword found where operator expected (Do you need to predeclare "with"?) at t/tlib/ExceptionChecker.pm line 37, near "with"

    The affected Error.pm syntax is the dynamic exception selector form:

    catch $exception_class with { ... }

  2. t/try_examples.t runs, but its golden-output comparison fails because PerlOnJava reports:

    1) ./examples/fail_example.pm:19 - test_fail(fail_example)

    while the expected upstream output is:

    1) examples/fail_example.pm:19 - test_fail(fail_example)

Impact

This is a pure-Perl compatibility failure, not an XS/native dependency or environmental prerequisite. The parser failure prevents most of the suite from compiling, and the path discrepancy breaks the remaining example-output assertion.

Acceptance criteria

  • catch $exception_class with { ... } parses and executes equivalently to system Perl on both backends.
  • Test::Unit 0.30 passes all upstream tests on both backends.
  • The example failure path is normalized consistently with Perl behavior, without changing the upstream tests.
  • Add focused project-owned regression coverage for both the dynamic catch ... with syntax and the ./ path discrepancy.

Evidence

  • CPAN run: 20260918-141920-96054
  • Distribution: Test-Unit-0.30
  • System Perl result: PASS, 3 files / 89 tests
  • PerlOnJava result: FAIL, 3 files / 4 observed subtests
  • Both JVM and interpreter backends reproduce the parser failure.

The GitHub duplicate search was attempted during classification but the GitHub API was unavailable; please check for related parser or path-normalization issues before merging this report.

主要语言
Perl
星标
64
派生
6
平均合并
5 小时 33 分钟
30 天内合并 PR
170

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

fglock/PerlOnJava 的其他 Issue

查看 fglock/PerlOnJava 的全部 Issue

相似的 Issue

更多 Perl Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。