Fix missing :all export tag in Hash::Util::FieldHash

Open
#1,379 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
perl
Domain
compilers

Research direction

Locate the bundled Hash::Util::FieldHash implementation and the project-owned test area, then inspect t/lru.t and the Compat delegation path. First run the regression with system Perl, then verify it on both PerlOnJava backends. Done means :all imports successfully, the Compat path loads, and Cache-Ref 0.04 passes t/lru.t and its unchanged full suite.

Written by the indexing model from the issue text.

Description

bug high-impact

Summary

The bundled PerlOnJava implementation of Hash::Util::FieldHash does not define the standard all export tag. This prevents Hash::Util::FieldHash::Compat from loading when it delegates to the bundled implementation.

CPAN evidence

CPAN random tester run 20260915-094334-6702:

  • Distribution: Cache-Ref 0.04
  • Result: 299/300 subtests; 1/12 test programs failed
  • Failing test: t/lru.t
  • Passing tests under system Perl: all 364 tests
  • PerlOnJava: failure reproduced on both JVM and interpreter backends

The affected import is:

use Hash::Util::FieldHash qw(:all);

PerlOnJava reports:

"all" is not defined in %Hash::Util::FieldHash::EXPORT_TAGS
Can't continue after import errors

Root cause

The bundled Hash::Util::FieldHash defines @EXPORT_OK but does not define %EXPORT_TAGS. Hash::Util::FieldHash::Compat 0.11 executes Hash::Util::FieldHash->import(":all") when the bundled implementation is available, so loading Cache::Ref::Util::LRU::Array fails.

Suggested fix

  1. Add the standard all export tag to the bundled Hash::Util::FieldHash implementation, containing its public exports.
  2. Add a project-owned regression test for use Hash::Util::FieldHash qw(:all) and the Compat delegation path.
  3. Validate the new test with system Perl first, then run it on both PerlOnJava backends.
  4. Re-run Cache-Ref 0.04 t/lru.t and its complete unchanged test suite.

This is a pure-Perl bundled-module compatibility defect, not an environmental or native-dependency failure.

Dominant language
Perl
Stars
64
Forks
6
Avg merge
5h 25m
Merged PRs (30d)
157

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fglock/PerlOnJava

All issues in fglock/PerlOnJava

Similar issues

More Perl issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.