You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Template::Like filehandle input does not populate scalar-reference output #1216
Template::Like 0.12 fails its filehandle-input test under both PerlOnJava backends. The same suite passes completely under system Perl.
Reproduction
use strict;
use warnings;
use Test::More tests=> 1;
use Template::Like;
my$path = "template-like-repro-$$.tmpl";
END { unlink$path }
openmy$write_fh, ">", $pathordie"create $path: $!";
print {$write_fh} "[% group %]\\n";
close$write_fh;
openmy$input_fh, "<", $pathordie"open $path: $!";
my$template = Template::Like->new;
my$output;
$template->process($input_fh, { group=>"hoge foo bar" }, \\$output)
ordie"process failed";
close$input_fh;
is($output, "hoge foo bar\\n", "filehandle input writes to scalar output");
Results
System Perl: passes all 119 tests in the distribution.
PerlOnJava JVM backend: the reproducer fails; the output scalar is empty/undefined.
PerlOnJava interpreter backend: same failure.
Other Template::Like input forms in the distribution test pass.
The archived CPAN run 20260902-105746-25731 recorded this as a regression: the previous pass was on 2026-08-18 at commit e9739bcbf. The original failing test is t/input.t, test 3 (filehandle).
Likely area for investigation: shared filehandle input and scalar-reference output handling in Template::Like->process().
The exact reproducer from this issue now passes on system Perl, the PerlOnJava JVM backend, and the interpreter backend.
The full upstream Template::Like 0.12 t/input.t passes on system Perl. On this branch the JVM backend passes its filehandle assertion, but the interpreter run still fails that assertion (and related file-based input assertions) after earlier test cases have run.
PR #1781 adds focused coverage for scalar-reference output from filehandle input, but does not resolve this broader interpreter-only sequence failure. Please leave this issue open for that follow-up.
State: released
Agent/session: codex-2026-11-04-io-regressions
Scope: #1216; verify Template::Like filehandle input to scalar-reference output.
Work: ready-for-review PR #1971, branch fix/1216-filehandle-scalar-coverage, based directly on master at head e99929c.
Checkpoint: 2026-11-04; PR #1971 adds real-filesystem input coverage and no longer depends on #1649.
Evidence: filehandle_input_real_file_scalar_output.t passes system Perl, JVM, and interpreter. Template::Like 0.12 t/input.t passes 13/13 on all three runtimes using the exact PR build. nice -n 19 timeout 3600 make passes on e99929c in 8m51s.
Resolution: the previously reported interpreter sequence failure no longer reproduces; PR #1781 contains the underlying I/O fix. Issue #1216 is closed with the retest evidence; #1971 remains open for review.
Next: respond to review on PR #1971.
Retested Template::Like 0.12 t/input.t on the exact PR #1971 build e99929c: 13/13 pass on system Perl, JVM, and interpreter. The filehandle-input assertion passes after the earlier input cases on all three runtimes. PR #1781 contains the underlying I/O fix; PR #1971 adds direct real-file regression coverage and is open for review. Closing as resolved.
Activity
fglock commentedon Oct 13, 2026
Follow-up while PR #1781 is in CI:
t/input.tpasses on system Perl. On this branch the JVM backend passes its filehandle assertion, but the interpreter run still fails that assertion (and related file-based input assertions) after earlier test cases have run.PR #1781 adds focused coverage for scalar-reference output from filehandle input, but does not resolve this broader interpreter-only sequence failure. Please leave this issue open for that follow-up.
fglock commentedon Nov 4, 2026
State: released
Agent/session: codex-2026-11-04-io-regressions
Scope: #1216; verify Template::Like filehandle input to scalar-reference output.
Work: ready-for-review PR #1971, branch fix/1216-filehandle-scalar-coverage, based directly on master at head e99929c.
Checkpoint: 2026-11-04; PR #1971 adds real-filesystem input coverage and no longer depends on #1649.
Evidence:
filehandle_input_real_file_scalar_output.tpasses system Perl, JVM, and interpreter. Template::Like 0.12t/input.tpasses 13/13 on all three runtimes using the exact PR build.nice -n 19 timeout 3600 makepasses on e99929c in 8m51s.Resolution: the previously reported interpreter sequence failure no longer reproduces; PR #1781 contains the underlying I/O fix. Issue #1216 is closed with the retest evidence; #1971 remains open for review.
Next: respond to review on PR #1971.
test(io): cover real-file input to scalar output (#1216)
fglock commentedon Nov 4, 2026
Retested Template::Like 0.12 t/input.t on the exact PR #1971 build e99929c: 13/13 pass on system Perl, JVM, and interpreter. The filehandle-input assertion passes after the earlier input cases on all three runtimes. PR #1781 contains the underlying I/O fix; PR #1971 adds direct real-file regression coverage and is open for review. Closing as resolved.
Merge pull request #1971 from fglock/fix/1216-filehandle-scalar-coverage