Template::Alloy::XS - XS version of key parts of Template::Alloy


    use Template::Alloy::XS;

    my $obj = Template::Alloy::XS->new;

    # see the Template::Alloy documentation


This module allows key portions of the Template::Alloy module to run in XS.

All of the methods of Template::Alloy are available. All configuration parameters, and all output should be the same. You should be able to use this package directly in place of Template::Alloy.


Add play_variable

With the compile_perl option we added play_variable which is a partially resolved variable mapper - more closely associated with Template::Stash's get method. We need to recreate the method here.

Memory leak

The use of FILTER aliases causes a memory leak in a cached environment. The following is an example of a construct that can cause the leak.

  [% n=1; n FILTER echo=repeat(2); n FILTER echo %]

Anybody with input or insight into fixing the code is welcome to submit a patch :).


The XS version doesn't call undefined_any when play_expr finds an undefined value. It needs to.


Paul Seamons, <>


This module may be distributed under the same terms as Perl itself.