Allow Moo constant closures capturing lexical values
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
- 52/100
Direzione di ricerca
Start with Moo/_Utils.pm around lines 216 and 221, then trace the BEGIN block and its string eval into PerlOnJava's constant-subroutine and lexical-capture handling. Reproduce with use Moo; on both backends and compare with standard Perl. Done means Moo loads successfully without the invalid constant-closure diagnostic and the MooX::Options::Actions basic test runs.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
PerlOnJava cannot compile Moo because it rejects the generated constant closure in Moo::_Utils. This prevents MooX::Options::Actions 0.001 from loading, even though the complete upstream suite passes under standard Perl.
Reproduction
The failure was found in CPAN random run 20260921-124328-13959 while testing MooX::Options::Actions 0.001. Its dependency chain includes MooX::Options 4.103 and Moo.
The smallest reproducer is:
use Moo;
On both the JVM backend and the interpreter backend, PerlOnJava reports:
Constants from lexical variables potentially modified elsewhere are no longer permitted
at Moo/_Utils.pm line 216.
BEGIN failed--compilation aborted at Moo/_Utils.pm line 221
Compilation failed in require
The error is raised while compiling Moo's BEGIN block that constructs a constant helper from a lexical expression involving ${^GLOBAL_PHASE}. Standard Perl accepts and loads this code.
CPAN evidence
The standard-Perl oracle passes the upstream distribution:
t/basic.t .............. ok
All tests successful.
Files=2, Tests=8
Result: PASS
Under PerlOnJava, t/author-pod-syntax.t is skipped as intended, but t/basic.t aborts before running any tests:
t/basic.t ..............
Dubious, test returned 255
No subtests run
Files=2, Tests=0
The dependency installation completed successfully. This is not a missing dependency or timeout; the failure occurs in PerlOnJava's bundled Moo implementation during compilation.
Expected behavior
PerlOnJava should accept Moo's generated constant subroutine and load Moo successfully. The diagnostic should not be emitted for the valid lexical-closure pattern used by current Moo releases.
Suspected area
Compiler handling of constant subroutines and lexical capture analysis, especially code generated by string eval inside a BEGIN block. The implementation appears to reject a pattern that standard Perl permits when a lexical value is captured by a constant subroutine.
Environment and scope
- Distribution:
MooX::Options::Actions0.001 - Dependencies:
MooX::Options4.103,Moo - PerlOnJava backends: JVM and interpreter
- PerlOnJava reports Perl 5.044001
- Standard Perl oracle: Perl 5.42.2 on macOS
- Native/XS code in the affected distribution: none
- Reverse-dependency analysis: not applicable; this is a pure-Perl compatibility failure
This failure is separate from the unrelated Ambiguous call resolved as CORE::try() warnings emitted by the same run.
- Lingua principale
- Perl
- Stelle
- 64
- Fork
- 7
- Merge medio
- 4h 29m
- PR unite (30g)
- 176
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
-
bug
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 area:unicode bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
fglock/PerlOnJava#1341 ·
I maintainer di solito rispondono entro 1 giorno
-
area:platform area:runtime bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
fglock/PerlOnJava#1635 ·
I maintainer di solito rispondono entro 1 giorno
-
area:cpan-port area:runtime bug
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
fglock/PerlOnJava#1634 ·
I maintainer di solito rispondono entro 1 giorno
-
area:cpan-port bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
fglock/PerlOnJava#1633 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di fglock/PerlOnJava
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
inverse-inc/packetfence#9387 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
linux-test-project/lcov#552 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
szTheory/exifcleaner#383 ·
I maintainer di solito rispondono entro 1 giorno
-
1.severity: security
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
NixOS/nixpkgs#569828 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
ESCOMP/CAM#1701 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni