MojoX::Renderer::Mason - HTML::Mason renderer for Mojo
use MojoX::Renderer::Mason; sub startup { my $self = shift; $self->types->type(html => 'text/html'); my $render = MojoX::Renderer::Mason->build( comp_root => $self->home->rel_dir('mason'), ); $self->renderer->add_handler(html => $render); }
Once added this renderer will be called by MojoX::Renderer for any given template where the suffix of the specified template matches the suffix used in the add_handler method.
add_handler
When the renderer is invoked, the contents of the stash will be passed to the template in %ARGS. Templates also have access to the context as $ctx
%ARGS
$ctx
This method returns a handler for the Mojo renderer.
Supported parameters are any parameter documented as valid to HTML::Mason::Interp, see HTML::Mason::Params
comp_root is a required parameter.
Graham Barr <gbarr@cpan.org>
Please report any bugs or feature requests to bug-mojox-renderer-mason at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=MojoX-Renderer-Mason. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-mojox-renderer-mason at rt.cpan.org
HTML::Mason, HTML::Mason::Params, MojoX::Renderer
Copyright (C) 2008 Graham Barr
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install MojoX::Renderer::Mason, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MojoX::Renderer::Mason
CPAN shell
perl -MCPAN -e shell install MojoX::Renderer::Mason
For more information on module installation, please visit the detailed CPAN module installation guide.