Mojolicious::Plugin::Handlebars - Text::Handlebars plugin
# Mojolicious $self->plugin('handlebars_renderer'); $self->plugin(handlebarse_renderer => { template_options => { helpers => { add => sub { my($context,$arg1,$arg2) = @_; return $arg1 + $arg2 } } } }); # Mojolicious::Lite plugin 'handlebars_renderer'; plugin handlebars_renderer => { template_options => { helpers => { add => sub { my($context,$arg1,$arg2) = @_; return $arg1 + $arg2 } } } };
Mojolicous::Plugin::HandlebarsRenderer is a simple loader for MojoX::Renderer::Handlebars.
Mojolicious::Plugin::HandlebarsRenderer inherits all methods from Mojolicious::Plugin and overrides the following ones:
$plugin->register
Registers renderer in Mojolicious application.
MojoX::Renderer::Handlebars, Mojolicious
Robert Grimes, <rmzgrimes at gmail.com>
<rmzgrimes at gmail.com>
This code is heavily based on the module Mojolicious::Plugin::XslateRenderer by "gray <gray at cpan.org>"
To install MojoX::Renderer::Handlebars, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MojoX::Renderer::Handlebars
CPAN shell
perl -MCPAN -e shell install MojoX::Renderer::Handlebars
For more information on module installation, please visit the detailed CPAN module installation guide.