Match standard Perl defer ordering and caller semantics
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
Comienza con las assertions fallidas en la prueba upstream Feature::Compat::Defer t/01defer.t y, a continuación, sigue cómo se representan los bloques defer, cómo se programan al salir del ámbito y cómo se exponen mediante caller. Reproduce el orden y los casos de caller tanto en el backend JVM como en el del intérprete, y añade regresiones del proyecto que cubran los casos de flujo de control indicados; se considera terminado cuando pasan todas las regresiones específicas y las 30 pruebas upstream.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
PerlOnJava does not fully reproduce standard Perl behavior for the core feature 'defer' construct used by Feature::Compat::Defer 0.02. The unchanged upstream suite passes under system Perl, but PerlOnJava fails deferred-block ordering around continue and exposes an extra caller frame for deferred blocks.
CPAN evidence
CPAN random tester run 20260915-094334-6702:
- Distribution:
Feature-Compat-Defer0.02 - System Perl: 30/30 tests pass across 4 test programs
- PerlOnJava: 28/30 tests pass; 2 assertions fail in
t/01defer.t - Build and test setup complete successfully
- The archived target run uses the default JVM backend
The failing assertions are:
defer + continue happens in an order
got: d1c1d2c2
expected: c1d1c2d2
caller does not see defer as __ANON__
got: main:t/01defer.t:228:main:t/01defer.t:232
expected: main:t/01defer.t:232
The other Feature::Compat::Defer tests pass, including module loading, exception behavior, and POD validation.
Failure 1: deferred-block ordering around continue
The test exercises a loop with deferred actions and continue. Standard Perl runs the loop continuation before executing the deferred actions for the relevant scope, producing c1d1c2d2. PerlOnJava produces d1c1d2c2, executing each deferred action before its corresponding continue path.
The fix must preserve defer ordering across loop bodies, continue blocks, nested scopes, early exits, and exceptions. It should not be implemented as a distribution-specific rewrite.
Failure 2: caller frame visibility
The test checks that code called from a deferred block sees the same caller context expected by standard Perl. PerlOnJava exposes an extra anonymous frame corresponding to the implementation of the deferred block.
The fix must preserve Perl-compatible caller results while still allowing deferred blocks to execute after the surrounding scope has completed. It should account for nested calls, eval, recursion, and deferred blocks created in subroutines.
Suspected ownership
This is a PerlOnJava compiler/runtime control-flow and call-frame compatibility defect. The exact ownership should be reduced before implementation:
- Trace how
deferblocks are represented and scheduled at scope exit. - Compare scheduling relative to loop
continue,next,last,redo, return, die, and normal block completion. - Inspect call-frame construction and
callerfiltering for deferred execution. - Verify whether the ordering and caller-frame failures share an implementation cause.
- Run focused reproductions on both JVM and interpreter backends; the archived regression confirms the default JVM backend only.
No missing service, native dependency, timeout, or upstream test defect is involved.
Regression coverage and acceptance criteria
- Add system-Perl-validated project regressions for defer ordering around
continueand for caller visibility. - Verify normal scope exit, loop control flow, exceptions, nested defers, and deferred blocks created in subroutines.
- Match standard Perl
callerresults without exposing implementation-only anonymous frames. - Pass the focused regressions on both JVM and interpreter backends.
- Re-run the unchanged
Feature::Compat::Defer0.02 suite and require all 30 tests to pass.
No exact existing PerlOnJava issue covers these feature 'defer' failures.
- Lenguaje dominante
- Perl
- Estrellas
- 64
- Forks
- 7
- Merge medio
- 4 h 56 min
- PR fusionados (30 d)
- 181
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de fglock/PerlOnJava
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
fglock/PerlOnJava#1651 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
fglock/PerlOnJava#1579 ·
Los mantenedores suelen responder en 1 día
-
area:cpan-port area:unicode bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
fglock/PerlOnJava#1341 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 1-2 días Aptitud para principiantes 54/100
fglock/PerlOnJava#1671 ·
Los mantenedores suelen responder en 1 día
-
area:cpan-port enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
fglock/PerlOnJava#1670 ·
Los mantenedores suelen responder en 1 día
Todos los issues de fglock/PerlOnJava
Issues similares
-
Needs Triage
Dificultad 2/5 Medio día Aptitud para principiantes 66/100
Perl/perl5#24913 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Perl/Fish oddness in new versionAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
gugod/App-perlbrew#879 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
RotherOSS/otobo#6205 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Add IO::Pipe classAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
yuki-kimoto/SPVM-IO#30 ·