Fix HTML::Template::Compiled global variables and warning metadata
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
Empieza ejecutando t/08_global_vars.t y t/39_line_info.t con los backends JVM e interpreter, y compara después su comportamiento en cuanto a ámbito, advertencias, advertencias fatales y ubicación en el código fuente. Sigue la ruta de include/loop y el código generado o evaluado solo lo suficiente para separar el comportamiento compartido en tiempo de ejecución de los defectos específicos del backend. Se considera terminado cuando pasan las regresiones específicas, se conservan las advertencias esperadas y los metadatos de línea, y pasa la suite upstream sin cambios.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
HTML::Template::Compiled 1.003 passes its upstream test suite under system Perl but fails under PerlOnJava in two functional areas: global-variable/include rendering and warning plus source-line metadata propagation.
CPAN evidence
CPAN random tester run 20260915-094334-6702:
- Distribution:
HTML-Template-Compiled1.003 - System Perl: complete suite passes; 38 test files, 259 executed tests
- PerlOnJava: 9 of 262 executed assertions fail across 2 of 38 test programs
- Build and dependency setup complete successfully
- Dependency:
Parse::RecDescent1.967015 builds and passes its own tests
The PerlOnJava failures are:
t/08_global_vars.t ............. 1 failure
t/39_line_info.t ............... 8 failures
The other 36 test programs pass, including template parameters, filters, includes, loops, expressions, encoding, plugins, precompilation, and POD-related tests.
Failure 1: global variable and include rendering
t/08_global_vars.t creates a template with global_vars => 1, a loop containing local values, and an included template that references a global value. System Perl renders the expected loop values and global values. PerlOnJava produces an empty result, causing the global_vars assertion to fail.
The test also covers an unset-variable control case and a separate global_vars => 2 nested tmpl_with case; those assertions pass. The failing behavior is therefore narrower than all global-variable or nested-scope handling.
Expected output includes:
loopvar: one ... global: 42 ... included: ...
loopvar: two ... global: 23 ... included: ...
loopvar: three ... global: 42 ... included: ...
Observed PerlOnJava output for the main assertion is empty.
Failure 2: warnings and template source line information
t/39_line_info.t renders a template containing an undefined value under three warning modes: disabled, enabled, and fatal. It runs each mode with line_info => 0 and line_info => 1.
The expected behavior under system Perl is:
warnings => 0: no warning and normal outputwarnings => 1: anUse of uninitialized valuewarningwarnings => fatal: empty output and a fatal exception- with
line_info => 1, warning and exception text identifiest.templates.line_info1.htmlline 4
Under PerlOnJava:
- expected warnings are absent
warnings => fataldoes not stop output- expected source-line metadata is absent
This produces 8 failed assertions in the test.
Suspected ownership
The failures are pure-Perl compatibility defects attributable to PerlOnJava. The exact ownership should be reduced before implementation:
- For
global_vars, inspect template include execution, scope lookup, and output-buffer control flow for the mainglobal_vars => 1loop path. - For
t/39_line_info.t, inspect warning-category emission, fatal-warning conversion, localized warning handlers, and propagation of template source locations through generated/evaluated code. - Compare JVM and interpreter backends and determine whether either symptom is shared runtime behavior or backend-specific.
- Confirm whether the two symptoms share a scope/evaluation or generated-code cause; do not assume they are one defect solely because they occur in the same distribution.
This is not a missing service, platform prerequisite, timeout, or native/XS failure.
Regression coverage and acceptance criteria
- Add a project-owned, system-Perl-validated regression for the smallest
global_vars => 1include/loop case that reproduces the empty output. - Add focused coverage for warning-disabled, warning-enabled, and fatal-warning behavior with and without template line information.
- Preserve expected output, warning text, fatal behavior, and source location on both JVM and interpreter backends.
- Re-run the unchanged
HTML::Template::Compiled1.003 suite and require all available upstream tests to pass. - Run the existing warning, scope, include, generated-code, and source-location tests to guard against regressions.
Related but distinct: #1377 concerns Log::Fine dynamic placeholders and caller metadata; it does not cover HTML::Template::Compiled global-variable rendering or warning behavior.
- Lenguaje dominante
- Perl
- Estrellas
- 64
- Forks
- 6
- Merge medio
- 5 h 18 min
- PR fusionados (30 d)
- 162
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
-
area:cpan-port area:unicode bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
fglock/PerlOnJava#1341 ·
-
area:backend area:cpan-port area:parser area:runtime bug
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
fglock/PerlOnJava#1477 ·
-
area:cpan-port area:parser area:unicode bug
Dificultad 3/5 1-2 días Aptitud para principiantes 67/100
fglock/PerlOnJava#1476 ·
-
area:backend area:cpan-port area:runtime bug
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
fglock/PerlOnJava#1475 ·
-
area:parser area:warnings bug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
fglock/PerlOnJava#1473 ·
Todos los issues de fglock/PerlOnJava
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
corazawaf/coraza-nginx#140 ·
-
1.severity: security
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
api7/lua-resty-saml#63 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100