NAME

Hyper::Control::Template - base class for control classes which needs templating features

VERSION

This document describes Hyper::Control::Template 0.1

SYNOPSIS

package Hyper::Control::Base;

use Class::Std::Storable;
use base qw(Hyper::Control Hyper::Control::Template);

1;

DESCRIPTION

Hyper::Control::Template provides the template for the inheriting class and handles Class::Std::Storable compatibility for different template engines.

ATTRIBUTES

template :set
template_filename :name :default<q{}>

SUBROUTINES/METHODS

_init_template :RESTRICTED

$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.

STORABLE_freeze_pre :CUMULATIVE

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.

get_template

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.

DIAGNOSTICS

CONFIGURATION AND ENVIRONMENT

Use Hyper::Singleton::Context for your configuration.

Sample for your Context.ini

[Class]
template=Hyper.Template.HTC

DEPENDENCIES

  • version

  • Class::Std::Storable

  • Hyper::Singleton::Context

  • Hyper::Functions

  • Readonly

  • Hyper::Template::HTC

INCOMPATIBILITIES

BUGS AND LIMITATIONS

RCS INFORMATIONS

Last changed by

$Author: ac0v $

Id

$Id: Template.pm 317 2008-02-16 01:52:33Z ac0v $

Revision

$Revision: 317 $

Date

$Date: 2008-02-16 02:52:33 +0100 (Sat, 16 Feb 2008) $

HeadURL

$HeadURL: http://svn.hyper-framework.org/Hyper/Hyper/trunk/lib/Hyper/Control/Template.pm $

AUTHOR

Andreas Specht <ACID@cpan.org>

LICENSE AND COPYRIGHT

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.