File Coverage

blib/lib/Dancer/Template.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition 2 2 100.0
subroutine 6 6 100.0
pod 1 2 50.0
total 25 26 96.1


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.3514_04'; # TRIAL
5             $Dancer::Template::VERSION = '1.351404';
6 195     195   55707 use strict;
  195         359  
  195         4715  
7 195     195   858 use warnings;
  195         290  
  195         3828  
8 195     195   57461 use Dancer::ModuleLoader;
  195         422  
  195         5659  
9 195     195   65750 use Dancer::Engine;
  195         428  
  195         14778  
10              
11             # singleton for the current template engine
12             my $_engine;
13 78     78 1 279 sub engine { $_engine }
14              
15             # init the engine according to the settings the template engine module will
16             # take from the setting name.
17             sub init {
18 211     211 0 2233 my ($class, $name, $config) = @_;
19 211   100     706 $name ||= 'simple';
20 211         1471 $_engine = Dancer::Engine->build(template => $name, $config);
21             }
22              
23             1;
24              
25             __END__