Hyper::Control::Template - base class for control classes which needs templating features
This document describes Hyper::Control::Template 0.01
package Hyper::Control::Base; use Class::Std::Storable; use base qw(Hyper::Control Hyper::Control::Template); 1;
Hyper::Control::Template provides the template for the inheriting class and handles Class::Std::Storable compatibility for different template engines.
$self->_init_template();
Loads the template class of current Context if it's not loaded. Creates a new template with base_path and filename/for_class attribute and save it as class attribute template.
Templates can't be freezed because we use non Class::Std::Storable Template engines. I don't think, that creating a persistent template Engine is useful.
my $template = $object->get_template();
Initialize the template if it's not existant in our class attributes, or create it via calling $self->_init_template(). Returns template corresponding to your class.
Use Hyper::Singleton::Context for your configuration.
Sample for your Context.ini
[Class] template=Hyper.Template.HTC
version
Class::Std::Storable
Hyper::Singleton::Context
Hyper::Functions
Readonly
Hyper::Template::HTC
$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/Control/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.