Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Interpreter fails Type::Library extends during BEGIN

Aperta
#1,744 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
58/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java, perl
Ambito
backend, compilers

Direzione di ricerca

Start with the minimal probe and run it using ./jperl --interpreter probe.pl, then compare its behavior with system Perl and JVM PerlOnJava. Trace interpreter handling of the package @ISA changes made by Type::Library -base before Type::Utils::extends performs its caller isa('Type::Library') check. Done means the probe and Dancer2's Dancer2/Core/Types.pm initialize without the Not a type library error on the interpreter backend.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:runtime bug

Summary

Dancer2 cannot load on the interpreter backend because its Dancer2::Core::Types type library fails during BEGIN { extends "Types::Standard" } with Not a type library.

Reproduction

package Probe::Types;
use strict;
use warnings;
use Type::Library -base;
use Type::Utils -all;
BEGIN { extends 'Types::Standard' }
print "loaded\n";

Run with ./jperl --interpreter probe.pl. The JVM backend and system Perl load this successfully; the interpreter reports Not a type library at the extends call. Dancer2's Dancer2/Core/Types.pm uses this same pattern and fails at its corresponding line 10.

Root cause

Type::Utils::extends checks that its caller isa('Type::Library'). Type::Library -base installs Type::Library in the caller package's @ISA during module setup. The interpreter does not expose that inheritance to the subsequent isa check in the same BEGIN block, although the JVM backend does. This prevents Dancer2's type library from initializing, so Dancer2 is not currently usable on the interpreter backend.

Evidence

  • use Type::Library -base alone succeeds under the interpreter.
  • The minimal extends 'Types::Standard' reproducer fails only under the interpreter.
  • The equivalent probe succeeds under JVM PerlOnJava and system Perl.
Lingua principale
Perl
Stelle
64
Fork
7
Merge medio
5h 8m
PR unite (30g)
193

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di fglock/PerlOnJava

Tutte le issue di fglock/PerlOnJava

Issue simili

Altre issue su Perl

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.