The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Hyper::Template - abstract base class to adopt template engines

VERSION

This document describes Hyper::Template 0.01

SYNOPSIS

    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;

DESCRIPTION

Hyper::Template offers some basic methods for adopting Template engines to the Hyper Framework.

SUBROUTINES/METHODS

_init

    Hyper::Template::_init();

Does some initializing tasks such as setting the correct template engine.

get_template_paths

    my $template_paths_ref = $self->get_template_path();

Get an array reference with paths where templates are located.

get_class_for_suffix

   'Hyper::Template::HTC' eq $template->get_class_for_suffix('htc');

Get default class for template file suffix.

get_suffix_for_class

   'htc' eq $template->get_suffix_for_class('Hyper::Template::HTC');

Get default template file suffix for a class.

DIAGNOSTICS

CONFIGURATION AND ENVIRONMENT

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

DEPENDENCIES

  • version

  • Hyper::Functions

  • Hyper::Error

  • Hyper::Singleton::Context

INCOMPATIBILITIES

BUGS AND LIMITATIONS

RCS INFORMATIONS

Last changed by

$Author: ac0v $

Id

$Id: Template.pm 528 2009-01-11 05:43:02Z ac0v $

Revision

$Revision: 528 $

Date

$Date: 2009-01-11 06:43:02 +0100 (So, 11 Jan 2009) $

HeadURL

$HeadURL: http://svn.hyper-framework.org/Hyper/Hyper/tags/0.05/lib/Hyper/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.