Revision history for Perl extension Text::Fab.
0.01 Fri Sep 5 07:50:43 2025
- original version; created by h2xs 1.23 with options
-Xn Text::Fab
A lot of technical work on the stub implementation, documentation and the test suite was passed to Gemini 2.5 Pro
(with 32K thinking budget + very delicate system instructions).
The implementation supports the most basic parts of processing pipeline only. Only the pure-config__* subsystem is
covered by the test suite.
0.02 Reworked with Gemini 3.8 Flash Medium (and one iteration with High) in a pure-chat in AI Studio; no system instructions.
The only target was to make the test suite to match the docs (and fix the implementation accordingly).
Only the updates to the docs checked by a human.
The model claims that all the APIs (except Control Flow, Loops, Caching, Root Directives) are implemented and covered by
the test suite.
0.03 Continue reworking with Gemini 3.8 Flash Medium in a pure-chat in AI Studio; no system instructions.
Restore the original comments in the code. Add new comments likewise.
Fix a mismatch of the semantic of preserved blinding lists with what is written in the docs.
Fix the scalar set/append with multiple arguments (only one allowed), allow string "offset" for hashes.
Implement priority-based group__postpone; support insertion of undo actions from undo actions.
Even if errors happen, all the postponed actions are performed.
t/10-corner-cases.t New file
0.04 Better coverage:
t/11-coverage-expansion.t New file
0.05 POD: Preview of the architecture on a (contrived) example. (Might not map 100% to the current implementation.)
Completeness of Directive Parser:
Added handlers for #prepend, #pop, and #create_section, wiring them to cfg__prepend, cfg__pop, and out__create_section.
Added target section tracking stack ($fab->{target_stack}) to support #end_section (as shown in the SYNOPSIS), restoring
the target section to the enclosing context.
Extended #emb parsing to support qualified namespace:basename syntax (e.g., #emb ChapterLayout:title and #emb _main:title).
Standardized default directive syntax errors to include E_SYNTAX_ERROR while maintaining compatibility with _handle_error.
Prefix Call Stack Lifecycle & Prefix-Aware Types:
Implemented call_stack__push($prefix, [$filter_name]) and call_stack__pop(), with underflow protection for the base prefix
'Fab/'.
Updated _get_key_type to resolve hash_keys and list_keys using cfg__get_prefixed_scan (without redundant fallbacks),
enabling localized prefix-scoped type definitions.
Introspection of Inclusion State:
Initialized and maintained $self->{config}{'opened_includes'} alongside 'opened_groups' inside include__text, cleanly
exposing the include path chain.
Makefile.PL put
use 5.022000;
TEST_REQUIRES => {
'Test::Exception' => 0, ## Present (?) since Perl 5.18 (which bundles MakeMaker 6.90 >= 6.64)
},
Better coverage:
t/12-parser-and-prefix-lifecycle.t New file
0.06 2026-10-22
[ Architecture & Callbacks ]
- Canonical engine callbacks moved to 'Fab/callbacks_bundle/dbg0'.
- 'Fab/callbacks' now accepts a bundle name string (e.g. 'dbg0') in addition
to direct hashrefs; resolved and propagated during initialization and scoping.
- Eliminated ad-hoc fallback guessing chains (//) across callback retrieval;
operational callbacks now resolve uniformly via cfg__get_prefixed_scan().
- Added support for scoped callback bundle switches via #start_group[callbacks=...]
and promise-local overrides via #emb[callbacks=...].
[ Embeds, Parameter Passing & Lenses ]
- Modernized #emb directive grammar to #emb[<opts>] <recipe> [<args...>].
Supported options in [...] include aim=..., in=..., with_blinder=...,
callbacks=..., and resolve_args=....
- Primitive out__embed() now takes ($recipe_basename, $recipe_ns, \@args, \%opts).
- Parameterized recipes: section arguments passed to a recipe are bound to
$ARGV0, $ARGV1, etc. in the recipe body via an internal call frame stack.
- Implemented lens affection massaging with deterministic static joining
(_fmt_lens_join) formatting candidate lenses as (A)/B and matching against
registered transitions in 'Fab/lens_affects'.
- Embed resolution now traverses the namespace DAG from the massaged virtual
root while respecting blinders and dynamic argument bindings.
[ Input & Inclusion ]
- Extended #include and include__text() to support container targets:
'section' and 'configkey'.
- Enforced strict arity validation across all inclusion modes:
* 'filename' and 'string' strictly require exactly 1 target argument.
* 'section' and 'configkey' strictly require 2 arguments: position 2 is
the joiner list key, and position 3 is the target container.
Arity mismatches now immediately halt with E_SYNTAX_ERROR (directives)
or E_TYPE_MISMATCH (Perl API).
- Section and configkey inclusions reuse the cyclic delimiter engine
(out__get_joined / cfg__get_joined).
[ Snapshot & Undo Engine ]
- Added a compatibility hook for FreezeThaw::copyContents treating compiled
CODE references as atomic/immutable values, preventing dclone() crashes
when configuration contains duplicated or shared code references across
snapshots and groups.
[ Documentation & Tests ]
- Updated POD to reflect modern #emb, #include, lens, and callback semantics
while preserving design rationale and marking planned subsystems as {???}.
- Modernized test suite (t/01 through t/12) to exercise strict arity,
parameterized recipes, lens affections, and container inclusion.
0.0601 Update to requiring 1.00 of FreezeThaw — instead of patching!
0.07 - 2026-10-23
* Recursion & Cycle Detection. Parameterized #emb resolution in assemble()
now differentiates invocations by their active argument signatures rather
than unconditionally blocking repeated "$ns:$basename" identifiers along
the active branch. Added the 'Fab/max_recursion_depth' configuration limit
(default 1000) to trap runaway cycles while permitting deep recursive recipe
decomposition.
* Configuration & Typing. Corrected the meta-configuration classification of
'Fab/list_keys' in new() to be registered under 'Fab/hash_keys' rather than
listing itself as a list key, preventing cfg__set() from clobbering the
internal hash into an array reference and causing dereference crashes in
_get_key_type().
* Inclusion & Options Forwarding. Normalized include__text() across all modes
('filename', 'string', 'section', 'configkey') to peel off and accept an
optional trailing options hashref without triggering E_TYPE_MISMATCH arity
errors. Updated the default directive parser to pass bracketed directive
options (#include[opts] ...) through to include__text().
* Test Suite. Added t/50_peano.t to stress-test deep recursive stack frames,
lexical call-frame isolation, and nested promise resolution by modeling pure
unary Peano arithmetic (addition, multiplication, non-negative subtraction,
and integer division with remainder) strictly on top of add1/pred primitives.
t/50_peano.t Peano arithmetic (honestly implemented in terms of incr, decr and is0)
t/51_rpn.t RPN calculator for embedded expressions
t/52_infix.t Infix notation calculator
t/53_at-end-paragraph_vars.t Same, with ${var} accessing the value of the variable at the end of the current paragraph
Keyboard Shortcuts
Global
s
Focus search bar
?
Bring up this help dialog
GitHub
gp
Go to pull requests
gi
Go to GitHub issues (only if GitHub is preferred repository)