Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Interpreter fails Type::Library extends during BEGIN

Ouverte
#1,744 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@fglock y travaille déjà.

Depuis le 11/10/2026.

  • #1751 par @fglock — ouverte

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
58/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
java, perl
Domaine
backend, compilers

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.
Langage dominant
Perl
Étoiles
64
Forks
7
Merge moyen
5 h 8 min
PR mergées (30 j)
193

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de fglock/PerlOnJava

Toutes les issues de fglock/PerlOnJava

Issues similaires

Plus d'issues Perl

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.