File tree 1 file changed +57
-3
lines changed
1 file changed +57
-3
lines changed Original file line number Diff line number Diff line change 1
- kelp-module-template-toolkit
2
- ============================
1
+ # NAME
3
2
4
- Template module for Kelp
3
+ Kelp::Module::Template::Toolkit - Template::Toolkit processing for Kelp applications
4
+
5
+ # SYNOPSIS
6
+
7
+ First ...
8
+
9
+ ``` perl
10
+ # conf/config.pl
11
+ {
12
+ modules => [' Template::Toolkit' ],
13
+ modules_init => {
14
+ ' Template::Toolkit' => { ... }
15
+ }
16
+ };
17
+ ```
18
+
19
+ Then ...
20
+
21
+ ``` perl
22
+ # lib/MyApp.pm
23
+ sub some_route {
24
+ my $self = shift ;
25
+ $self -> template(' some_template' , { bar => ' foo' });
26
+ }
27
+ ```
28
+
29
+ # DESCRIPTION
30
+
31
+ This module provides an interface for using [ Template] ( http://search.cpan.org/perldoc?Template ) inside a Kelp web application.
32
+
33
+ # REGISTERED METHODS
34
+
35
+ ## template
36
+
37
+ ` template($filename, \%vars) `
38
+
39
+ Renders a file using the currently loaded template engine.
40
+
41
+ # PERKS
42
+
43
+ ## UTF8
44
+
45
+ [ Template] ( http://search.cpan.org/perldoc?Template ) is sometimes unable to detect the correct encoding, so to ensure
46
+ proper rendering, you may want to add ` ENCODING ` to its configuration:
47
+
48
+ ``` perl
49
+ # conf/config.pl
50
+ {
51
+ modules => [' Template::Toolkit' ],
52
+ modules_init => {
53
+ ' Template::Toolkit' => {
54
+ ENCODING => ' utf8'
55
+ }
56
+ }
57
+ };
58
+ ```
You can’t perform that action at this time.
0 commit comments