in reply to Re: How do you use Template Toolkit with Dancer2?
in thread How do you use Template Toolkit with Dancer2?

You have not mentioned Dancer2 at all, so I can only assume that part is irrelevant. In which case, here is my SSCCE:

#!/usr/bin/env perl use strict; use warnings; use utf8; use Template; my $tt = Template->new; my $name = 'François'; my $ttext = <<EOT; As a literal: François As an interpolated variable: $name As a template variable: [% name %] EOT $tt->process (\$ttext, { name => $name });

🦛

Replies are listed 'Best First'.
Re^3: How do you use Template Toolkit with Dancer2?
by PiotrS (Novice) on Apr 21, 2022 at 22:09 UTC
    Thank you for your quick response. Yes, I am investigating Dancer 2 to use as a replacement for the venerable CGI I've been using for many years. So my question is in context of Dancer 2. I am still in the early stages of familiarizing myself with it. Any suggestions would be greatly appreciated.