Hyper::Template - abstract base class to adopt template engines
This document describes Hyper::Template 0.01
package Hyper::Template::Simple; use base qw(Hyper::Template); my %param_of :ATTR(:default<{}>); sub param { my $ident = ident shift; $param_of{$ident} = { %{$param_of{$ident}}, @_, }; } sub output { sprintf $template_file_content, $param_of{ident shift}; } 1;
Hyper::Template offers some basic methods for adopting Template engines to the Hyper Framework.
Hyper::Template::_init();
Does some initializing tasks such as setting the correct template engine.
my $template_paths_ref = $self->get_template_path();
Get an array reference with paths where templates are located.
'Hyper::Template::HTC' eq $template->get_class_for_suffix('htc');
Get default class for template file suffix.
'htc' eq $template->get_suffix_for_class('Hyper::Template::HTC');
Get default template file suffix for a class.
Use Hyper::Singleton::Context for your configuration.
Sample for your Context.ini
[Global] base_path=/srv/web/www.example.com/ [Class] translator=Hyper.Translator.Noop
version
Hyper::Functions
Hyper::Error
Hyper::Singleton::Context
$Author: ac0v $
$Id: Template.pm 528 2009-01-11 05:43:02Z ac0v $
$Revision: 528 $
$Date: 2009-01-11 06:43:02 +0100 (So, 11 Jan 2009) $
$HeadURL: http://svn.hyper-framework.org/Hyper/Hyper/tags/0.05/lib/Hyper/Template.pm $
Andreas Specht <ACID@cpan.org>
<ACID@cpan.org>
Copyright (c) 2007, Andreas Specht <ACID@cpan.org>. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Hyper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Hyper
CPAN shell
perl -MCPAN -e shell install Hyper
For more information on module installation, please visit the detailed CPAN module installation guide.