package Dancer::Template; use strict; use warnings; use Dancer::ModuleLoader; use Dancer::Engine; # singleton for the current template engine my $_engine; sub engine { $_engine } # init the engine according to the settings the template engine module will # take from the setting name. sub init { my ($class, $name, $config) = @_; $name ||= 'simple'; $_engine = Dancer::Engine->build(template => $name, $config); } 1; __END__ =pod =head1 NAME Dancer::Template - template wrapper for Dancer =head1 DESCRIPTION This module is the wrapper that provides support for different template engines. =head1 USAGE =head2 Default engine The default engine used by Dancer::Template is Dancer::Template::Simple. If you want to change the engine used, you have to edit the B