OX::View::TT - View wrapper class for TT renderers
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:
The base URL that this app is hosted at (
A function which forwards its arguments to the
uri_for method in OX::Request.
The hashref of match variables for the current route (equivalent to the
mapping method on the OX::Request object).
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.
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.
You can find this documentation for this module with the perldoc command.
You can also look for information at:
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