/usr/share/perl5/Dancer/Template.pm is in libdancer-perl 1.3091+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | 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<template>
configuration variable.
=head2 Configuration
The B<template> configuration variable tells Dancer which engine to use
for rendering views.
You change it either in your config.yml file:
# setting TT as the template engine
template: "template_toolkit"
Or in the application code:
# setting TT as the template engine
set template => 'template_toolkit';
=head1 AUTHORS
This module has been written by Alexis Sukrieh. See the AUTHORS file that comes
with this distribution for details.
=head1 LICENSE
This module is free software and is released under the same terms as Perl
itself.
=head1 SEE ALSO
See L<Dancer> for details about the complete framework.
You can also search the CPAN for existing engines in the Dancer::Template
namespace.
=cut
|