Why not adopt me?
NAME
OX::View::TT - View wrapper class for TT renderers
VERSION
version 0.01
SYNOPSIS
package MyApp;
use OX;
has view => (
is => 'ro',
isa => 'OX::View::TT',
dependencies => ['template_root'],
);
DESCRIPTION
This is a very thin wrapper around Template which exposes some OX functionality to your template files. Templates rendered with this class will have access to these additional variables:
base
-
The base URL that this app is hosted at (
SCRIPT_NAME
). uri_for
-
A function which forwards its arguments to the
uri_for
method in OX::Request. m
-
The hashref of match variables for the current route (equivalent to the
mapping
method on the OX::Request object).
METHODS
render($r, $template, $params)
Renders a template, and returns a string containing the contents. $r
is the request object, $template
is the name of the template, and $params
are extra variables to pass to the template.
template($r)
This is an action method which can be used directly as a route endpoint:
route '/about' => 'view.template', (
template => 'about.tt',
);
BUGS
No known bugs.
Please report any bugs through RT: email bug-ox-view-tt at rt.cpan.org
, or browse to http://rt.cpan.org/NoAuth/ReportBug.html?Queue=OX-View-TT.
SEE ALSO
SUPPORT
You can find this documentation for this module with the perldoc command.
perldoc OX::View::TT
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
RT: CPAN's request tracker
Search CPAN
AUTHOR
Jesse Luehrs <doy at cpan dot org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2013 by Jesse Luehrs.
This is free software, licensed under:
The MIT (X11) License