blob: 8816ecdab7a9e3287e2449614e2ae1bccf7b01e9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package Dancer::Template::Declare;
use strict;
use warnings;
use base 'Dancer::Template::Abstract';
use Template::Declare;
my $_init;
sub init {
my $self = shift;
$_init = $self->{config};
}
sub view { return $_[1] }
sub layout { return $_[3] }
sub render {
my ($self, $template, $token) = @_;
Template::Declare->init( %{ $_init } );
Template::Declare->show($template, $token);
}
1;
|