Template::Simple .04 is on CPAN
I have released Template::Simple .04 to CPAN. This is a major update
with the addition of compiled templates, a runnable cookbook script and
a benchmark script. Templates can be compiled and run much faster. The
benchmark shows nested templates rendering up to 34 times faster than
Template::Toolkit and faster than Template::Teeny. If you want to flame
about the speed issue, you are better off adding entries to the benchmark (it needs a
redesign as it was sent to me) and showing faster templating
examples. The cookbook is a runnable script showing many examples of how
to use T::S along with pod describing each example.
The design philosophy of T::S is total isolation of data logic from the
template itself. A template designer can work independently from a coder
who works on the data. Also this give more flexibility you can mix and
match different templates with different data trees without rewriting
either. All the common idioms are supported including nested data and
templates, include files, loops, conditionals, etc. You can also customize behavior with code callbacks in the data. The cookbook script
in extras/ will get you started with all of the idioms. And with the
compiled templates you now get the fastest rendering.
Have the appropriate amount of fun.
Template::Tiny also does a minimal TT syntax. Have you done a speed test between the two?
i am planning on a full rewrite of the benchmark script to make it
easier to add other templaters and to also run and ignore the templaters
that are not loaded. probably it will also have a command line option to
select which templaters to run. given my recent burst of module
activity, it may get done in a couple of weeks.
I have just finished adding toolkit and template::tiny to my new benchmark
program. i will be posting about this benchmark very soon as i want the
various template users to be able to optimize the other entries. i had
to slightly modify template::teeny to support returning the rendered
template. some nice features in the script are tables of templates with
their data and expected results, tables of templaters and and optional
verification that each templater generates the same thing. it will be easy to add other templaters as desired. the speed
results are going to flip some heads.