[dancer-users] In-code template configuration - order matters?

Gabor Szabo gabor at szabgab.com
Tue Aug 25 23:14:52 BST 2015


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' };


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

Why is that?

ps. I don't have any configuration files. This is a stand-alone script with
an external tt file.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20150826/37d8f1bf/attachment.html>

More information about the dancer-users mailing list