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

Export fieldhash from Hash::Util

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

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

调研方向

Start with PerlOnJava’s bundled Hash::Util and its Hash::Util::FieldHash implementation; the issue identifies these APIs as the affected code. Run the reproducer on the JVM and interpreter backends, then check the project’s fieldhash tests and the Hash-ExtendedKeys 1.01 suite. Done means export succeeds, scalar keys work alongside reference keys, and the requested suites pass on both backends and system Perl.

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

描述

area:runtime bug

Summary

PerlOnJava's bundled Hash::Util omits the core fieldhash export, so CPAN module Hash::ExtendedKeys cannot load. After restoring the export, its tests also expose that the bundled fieldhash tie rejects ordinary scalar keys; core Perl treats those as regular hash entries.

Reproducer

use Hash::Util qw(fieldhash);
fieldhash my %fields;
$fields{plain_key} = 'value';

Expected: the import succeeds; ordinary scalar keys behave like normal hash entries, and reference keys retain identity-based fieldhash behavior.

PerlOnJava JVM and interpreter: before the export fix, compilation stops with "fieldhash" is not exported by the Hash::Util module. With the export restored but before scalar-key support, Hash-ExtendedKeys tests fail with Hash::Util::FieldHash keys must be references.

CPAN evidence

  • Distribution: Hash-ExtendedKeys 1.01
  • CPAN random tester run: 20261027-085020-3852
  • Original failing test: t/00-load.t; import aborts before the suite proceeds
  • System Perl 5.42.2: complete unchanged upstream suite passes (7 files, 24 tests)
  • PerlOnJava Perl 5.044001: import failure reproduced on both JVM and interpreter backends; additional fieldhash behavior gap exposed on JVM

The failure was observed on macOS 26. The affected APIs are implemented by PerlOnJava's bundled modules. This is distinct from #1379, which fixed Hash::Util::FieldHash's :all export tag.

Acceptance

  • Export fieldhash from Hash::Util with behavior compatible with core Perl's Hash::Util::FieldHash.
  • Preserve ordinary scalar-key operations alongside reference-key fieldhash behavior.
  • Add project-owned coverage validated on system Perl and both PerlOnJava backends.
  • Confirm Hash-ExtendedKeys 1.01 loads and its unchanged suite passes.
主要语言
Perl
星标
65
派生
8
平均合并
6 小时 28 分钟
30 天内合并 PR
181

环境准备

  • 提供 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 摘要。