1Dancer2::Template::SimpUlsee(r3)Contributed Perl DocumenDtaantcieorn2::Template::Simple(3)
2
3
4
6 Dancer2::Template::Simple - Pure Perl 5 template engine for Dancer2
7
9 version 0.300004
10
12 To use this engine, you may configure Dancer2 via "config.yaml":
13
14 template: simple
15
17 This template engine is provided as a default one for the Dancer2 micro
18 framework.
19
20 This template engine should be fine for development purposes but is not
21 a powerful one, it's written in pure Perl and has no C bindings to
22 accelerate the template processing.
23
24 If you want to power an application with Dancer2 in production
25 environment, it's strongly advised to switch to
26 Dancer2::Template::TemplateToolkit.
27
29 render($template, \%tokens)
30 Renders the template. The first arg is a filename for the template
31 file or a reference to a string that contains the template. The second
32 arg is a hashref for the tokens that you wish to pass to
33 Template::Toolkit for rendering.
34
36 A template written for "Dancer2::Template::Simple" should be working
37 just fine with Dancer2::Template::TemplateToolkit. The opposite is not
38 true though.
39
40 variables
41 To interpolate a variable in the template, use the following
42 syntax:
43
44 <% var1 %>
45
46 If var1 exists in the tokens hash given, its value will be written
47 there.
48
50 Dancer2, Dancer2::Core::Role::Template,
51 Dancer2::Template::TemplateToolkit.
52
54 Dancer Core Developers
55
57 This software is copyright (c) 2020 by Alexis Sukrieh.
58
59 This is free software; you can redistribute it and/or modify it under
60 the same terms as the Perl 5 programming language system itself.
61
62
63
64perl v5.32.0 2020-07-28 Dancer2::Template::Simple(3)