OX::View::TT - View wrapper class for TT renderers
version 0.01
package MyApp; use OX; has view => ( is => 'ro', isa => 'OX::View::TT', dependencies => ['template_root'], );
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).
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).
mapping
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.
$r
$template
$params
template($r)
This is an action method which can be used directly as a route endpoint:
route '/about' => 'view.template', ( template => 'about.tt', );
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.
bug-ox-view-tt at rt.cpan.org
OX
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
http://annocpan.org/dist/OX-View-TT
CPAN Ratings
http://cpanratings.perl.org/d/OX-View-TT
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=OX-View-TT
Search CPAN
http://search.cpan.org/dist/OX-View-TT
Jesse Luehrs <doy at cpan dot org>
This software is Copyright (c) 2013 by Jesse Luehrs.
This is free software, licensed under:
The MIT (X11) License
To install OX::View::TT, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OX::View::TT
CPAN shell
perl -MCPAN -e shell install OX::View::TT
For more information on module installation, please visit the detailed CPAN module installation guide.