Hi,

given this simple template:

<h2><% name %></h2>

And this code:


#!/usr/bin/env perl
use Dancer2;

set engines => {
    template => {
        template_toolkit => {
            start_tag  => '<%',
            end_tag    =>  '%>',
        }
    }
};
set template =>  "template_toolkit";
 
get '/' => sub {
    template 'demo', { name => 'Perl Maven' };
};

dance;
       

I see the expected display, but if I change the order of the two 'set' statements
then I just get   <h2><% name %></h2> as output.


Why is that?


Gabor
ps. I don't have any configuration files. This is a stand-alone script with an external tt file.