line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Dancer::Template; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:SUKRIA'; |
3
|
|
|
|
|
|
|
#ABSTRACT: template wrapper for Dancer |
4
|
|
|
|
|
|
|
$Dancer::Template::VERSION = '1.3520'; |
5
|
194
|
|
|
194
|
|
73102
|
use strict; |
|
194
|
|
|
|
|
462
|
|
|
194
|
|
|
|
|
5726
|
|
6
|
194
|
|
|
194
|
|
993
|
use warnings; |
|
194
|
|
|
|
|
448
|
|
|
194
|
|
|
|
|
4752
|
|
7
|
194
|
|
|
194
|
|
71507
|
use Dancer::ModuleLoader; |
|
194
|
|
|
|
|
498
|
|
|
194
|
|
|
|
|
5956
|
|
8
|
194
|
|
|
194
|
|
78123
|
use Dancer::Engine; |
|
194
|
|
|
|
|
571
|
|
|
194
|
|
|
|
|
17821
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# singleton for the current template engine |
11
|
|
|
|
|
|
|
my $_engine; |
12
|
78
|
|
|
78
|
1
|
317
|
sub engine { $_engine } |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# init the engine according to the settings the template engine module will |
15
|
|
|
|
|
|
|
# take from the setting name. |
16
|
|
|
|
|
|
|
sub init { |
17
|
210
|
|
|
210
|
0
|
2294
|
my ($class, $name, $config) = @_; |
18
|
210
|
|
100
|
|
|
932
|
$name ||= 'simple'; |
19
|
210
|
|
|
|
|
1822
|
$_engine = Dancer::Engine->build(template => $name, $config); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
__END__ |