Lexical sub calls from named subs lose their binding (Test2::Tools::DOM 0.100)
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
- 22/100
Direzione di ricerca
Start by reproducing the failure with ./jperl -Ilib -I/private/tmp/cpan-module-classification/Mojo-DOM58-3.003/lib t/html.t, using lib/Test2/Tools/DOM.pm (lexical my sub call and my sub multi at lines 29 and 44, called from named subs) purely as the trigger. The real work is in the compiler's handling of lexical subs referenced from named subs — trace where named subs are compiled and how their pad/closure captures are built, since that is where the binding is dropped. Done means standard-Perl behaviour: no will not stay shared warnings and the t/html.t and t/synopsis.t tests passing.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Module
- Distribution:
Test2-Tools-DOM0.100 - CPAN tester report: syntax error, 2026-10-25
- System Perl:
/usr/bin/perl5.34.1 on macOS arm64;prove -lr t/passes 3 files / 12 tests (with cachedMojo::DOM583.003 added only toPERL5LIB). - PerlOnJava:
timeout 120 ./jperl -Ilib -I/private/tmp/cpan-module-classification/Mojo-DOM58-3.003/lib t/html.tfails (10 test failures);t/synopsis.taborts on first call.
Reproducer and cause
lib/Test2/Tools/DOM.pm declares lexical subs my sub call and my sub multi at lines 29 and 44, then calls them from named package subs (all_text, tag, attr, etc.). PerlOnJava emits Subroutine "&call" will not stay shared / &multi warnings for these references; at runtime the lexical CV is absent and calls fail with Undefined subroutine &Test2::Tools::DOM::call called (or multi) at lines 65/69.
This isolates the failure to lexical-sub binding/capture across named subroutine bodies: the compiler is treating references to lexically declared subs as closure-pad captures that are not preserved in the named subs. Standard Perl resolves these lexical sub calls correctly. The failure happens before DOM assertion behavior is exercised.
Expected
Lexical sub references from named subs retain the lexical subroutine binding and execute as on standard Perl, without undefined-subroutine errors.
- Lingua principale
- Perl
- Stelle
- 67
- Fork
- 8
- Merge medio
- 5h 12m
- PR unite (30g)
- 131
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di fglock/PerlOnJava
-
area:cpan-port bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
fglock/PerlOnJava#2153 ·
I maintainer di solito rispondono entro 1 giorno
-
area:cpan-port area:parser bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
fglock/PerlOnJava#2137 ·
I maintainer di solito rispondono entro 1 giorno
-
area:backend area:cpan-port area:runtime bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
fglock/PerlOnJava#2071 ·
I maintainer di solito rispondono entro 1 giorno
-
area:runtime documentation enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
fglock/PerlOnJava#1579 ·
I maintainer di solito rispondono entro 1 giorno
-
area:cpan-port bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
fglock/PerlOnJava#2157 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di fglock/PerlOnJava
Issue simili
-
Dev-output directory preparation accepts file-valued lib/include paths and fails on dangling linksApertateam-cli
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 93/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
inverse-inc/packetfence#9728 ·
I maintainer di solito rispondono entro 1 giorno
-
fix(char-create): show the real reason a character is refusedForse già presa @baphomello l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno