Skip to content

fix: re-save compiled template to disk when source changes#334

Merged
atoomic merged 1 commit intoabw:masterfrom
atoomic:koan.atoomic/provider-resave-compiled
Feb 14, 2026
Merged

fix: re-save compiled template to disk when source changes#334
atoomic merged 1 commit intoabw:masterfrom
atoomic:koan.atoomic/provider-resave-compiled

Conversation

@Koan-Bot
Copy link
Contributor

When COMPILE_DIR/COMPILE_EXT is configured, the first compile of a
template correctly writes the compiled Perl code to disk. However, when
the template source file is later modified and _refresh() recompiles it,
the call to _compile() was missing the compiled filename argument. This
meant the recompiled template was only stored in memory, never persisted
to disk.

On the next cold start, the stale compiled file would be loaded instead
of the updated source, leading to incorrect template output until the
compiled file was manually deleted.

Fix: pass _compiled_filename() to _compile() in _refresh(), matching the
behavior already used in _fetch().

Resolves: #98
See also: #197

Co-Authored-By: Kōan noreply@anthropic.com

When COMPILE_DIR/COMPILE_EXT is configured, the first compile of a
template correctly writes the compiled Perl code to disk. However, when
the template source file is later modified and _refresh() recompiles it,
the call to _compile() was missing the compiled filename argument. This
meant the recompiled template was only stored in memory, never persisted
to disk.

On the next cold start, the stale compiled file would be loaded instead
of the updated source, leading to incorrect template output until the
compiled file was manually deleted.

Fix: pass _compiled_filename() to _compile() in _refresh(), matching the
behavior already used in _fetch().

Resolves: abw#98
See also: abw#197

Co-Authored-By: Kōan <noreply@anthropic.com>
@atoomic atoomic marked this pull request as ready for review February 14, 2026 15:50
@atoomic atoomic merged commit b907af5 into abw:master Feb 14, 2026
78 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[rt.cpan.org #60640]

2 participants

Comments