Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Export fieldhash from Hash::Util

Fechada
#1,909 1 comentário 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
45/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
perl
Domínio
backend

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.
Linguagem predominante
Perl
Estrelas
65
Forks
8
Merge médio
6h 28min
PRs com merge (30d)
184

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de fglock/PerlOnJava

Todas as issues de fglock/PerlOnJava

Issues semelhantes

Mais issues de Perl

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.