Revision history for Perl extension Template::Plex.
v0.7.1 2024-04-23
[fixes]
- { and } characters are now replaced with Perl escape equivalents \{ and
\} for better code generation support (ie C, Perl, Javascript etc that
use {} as block delimieters)
- Extra test for reference types in slot rendering
- use file_name_is_absolute for path testing instead of regex
[new features]
- Add parent shortcut in templates
- If a template is not inherited, slot references are to the template, not
the parent
v0.7.0 2024-01-10
[improvements]
- immediate load and render will use the supplied vars also as fields to
render call and actually make them usable in immediate templates.
- template relative paths can now be specified with reference to scalar
- absolute template paths no longer use prepend 'root' dir option
[depricated]
- 'including' templates will be removed from future versions in favour of
sub templates for better diagnostics.
- 'comment' support will be removed from future versions in favour of
using the standard multiline form or @{[ # comment ]}
v0.6.3 2023-12-12
[improvements]
- Added DEBUG flag in addition to Log::OK levels to prevent logging noise
v0.6.2 2023-08-28
[fixes]
- Added missing dependencies Export::These and constant::more
- Removed unused dependency enum
v0.6.1 2023-08-27
[improvements]
- RAM usage reduction on loading the module. (5.8MB down to 3.7MB)
v0.6.0 2023-05-09
[new features]
- cache and immediate subroutines now also supports a single argument call.
Makes using cached and immediate templates much nicer in loops with
implicit linking to current template variables.
- added fill_var, append_var and prepend_var to set, append and prepend
package variables. All return empty strings
[improvements]
- Error::Show is now only required when an error is to be shown, saving on
memory otherwise
- Removed unused imported modules, reducing wasted memory
- Fixed spelling mistakes in changes file
[bug fixes]
- a slot in a parent template with no default value doesn't die now
[pod]
- Documented changes to immediate and cache routines
- Documented *_var routines
v0.5.0
[new features]
- added append_slot
- added prepend_slot
- "cheat comments", which allows line starting with a Perl comment to be
ignored. "use_comments" must be specified in options hash to enable
[changes]
- Now using Error::Show for error context instead of internal code
- Improved diagnostics with unmatched "{" or "[" in template.
[pod]
- Improved Error and Logging section with a new example
- Documented new features
- Added information about line error numbers in regards to block_fix and include
[other]
- Reformatted Changes file
v0.4.3 2022-06-28
- Fixed failing tests... again..
- Improved error reporting context on template syntax error (reduced line count)
- Added 'inject' option when loading a template
- Briefly documented 'use' and 'inject' options when loading templates
0.4.2 2022-06-23
- Removed usage of perl-5.36 features isa and multi-element for loops
- Reverted min perl version back to 5.24 for better compatibility
- Checked dependencies also work with perl 5.24
- Removed other non used features
0.4.1 2022-06-22
- Fix bad tests
0.4.0 2022-06-22
- Template inheritance and slotting
- Requires Perl 5.36 (for isa)
- User subclassing is now possible
- Removed redundant code in in preparing templates
- Sub classes can access metadata (options) and arguments( variables) via
accessor methods meta and args
- The current template is stored in a lexical variable $self
- Template is of type Template::Plex or user subclass
- Added %meta to store filename and load/processing options
- Added 'use' key in options hash to allow using of packages in lexical scope
- Added 'base' key in options hash to specify base class for template
- Much easier to implement new templating systems on top of this module now
- Removed automatic using of String::Util. Templates can use on demand manually
- Fixed bug in recursive template loading that would not update the dynamic
package name
- Added logging support with Log::ger and Log::OK
- jmap now requires at least two arguments and works with array/list
instead of a reference
- Block fix no longer kills multiple newlines after a directive close
- die is called on template compilation error. (=> try/catch)
- Error message include a summary of the error location and template name
- plx and plex function depreciated
- Class methods load/cache/immediate for loading templates
0.3.0 2022-04-25
- Subtemplates now can modify top level arguments hash (ie add keys not
previously available)
- Added 'skip' sub which cancels the current templates rendering, but
allows variable manipulation
- Added tests for skip and sub template argument manipulation
- Updated pod
0.2.0 2022-03-31
- Cleanup generated code a little
- Added plx subroutine for automatic loading/caching/rendering
- Added block_fix feature
- Added jmap subroutine
- Added plex_clear basic cache clearing
- Added block and pl subroutine
- Added importing of String::Util subroutines into template
- Updated documentaion
0.1.1 2022-02-18
- Fixed examples in example directory
- Fixed Changes (wrong package name)
0.1.0 2021-08-4
- Inital version