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

caller reports void context for scalar eval caller frame

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

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

调研方向

Start with the caller-frame context tracking path used by caller(1)[5] and the existing upstream regression test t/002_must_be_list.t. Reproduce the scalar and void eval cases on both JVM and interpreter backends, then trace how each backend reports the caller context. Done means the project-owned regression coverage passes with system Perl and the upstream suite passes on both PerlOnJava backends.

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

描述

area:runtime bug

Summary

caller(1)[5] reports void instead of scalar for the caller frame when a failing call is made through a scalar eval.

Reproducer

Call Call::Context::must_be_list() from foo, where try_it returns foo(), then run:

eval { try_it() };
scalar eval { try_it() };
scalar eval { () = try_it() };

The upstream Call-Context 0.05 test t/002_must_be_list.t expects the second call's exception to identify scalar context and the third call to succeed.

Evidence

  • PerlOnJava b8e16493d, JVM backend, Java 24.0.2, macOS arm64: 1/6 assertions failed in t/002_must_be_list.t; actual diagnostic says foo called in non-list (void) context during the scalar eval.
  • Interpreter backend on the same checkout also reports void for the scalar case and has an additional failure in the list case.
  • System Perl 5.42.2 passes all 6 assertions; the archived CPAN oracle for run 20261021-223510-14962 passes all 13 tests across all three test files.
  • The same CPAN run records the PerlOnJava failure as 12/13 tests, with test 5 failing in t/002_must_be_list.t.
  • The archived regression record identifies d5170d2d0 as the last-known-working version.

The distribution is pure Perl. This appears to be a PerlOnJava caller-frame context tracking issue; the JVM and interpreter backends are both affected.

Acceptance criteria

  • caller(1)[5] reports scalar for the scalar-eval call and undef for the void call.
  • The upstream Call-Context 0.05 test suite passes on both PerlOnJava backends.
  • Add permanent project-owned regression coverage and validate it with system Perl.
主要语言
Perl
星标
65
派生
8
平均合并
6 小时 28 分钟
30 天内合并 PR
184

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

fglock/PerlOnJava 的其他 Issue

查看 fglock/PerlOnJava 的全部 Issue

相似的 Issue

更多 Perl Issue

把新 issue 发到你的邮箱

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