Mojolicious::Plugin::DefaultHelpers - Default Helpers Plugin
# Mojolicious $self->plugin('default_helpers'); # Mojolicious::Lite plugin 'default_helpers';
Mojolicous::Plugin::DefaultHelpers is a collection of renderer helpers for Mojolicious.
<%= content %>
Insert content into a layout template.
<%= dumper $foo %>
Dump a Perl data structure using Data::Dumper.
<% extends 'foo'; %>
Extend a template.
<%= flash 'foo' %>
Access flash values.
<%= include 'menubar' %> <%= include 'menubar', format => 'txt' %>
Include a partial template.
<% layout 'green'; %>
Render this template with a layout.
<%= memorize begin %> <%= time %> <% end %> <%= memorize {expires => time + 1} => begin %> <%= time %> <% end %> <%= memorize foo => begin %> <%= time %> <% end %> <%= memorize foo => {expires => time + 1} => begin %> <%= time %> <% end %>
Memorize block result in memory and prevent future execution. Note that this helper is EXPERIMENTAL and might change without warning!
<%= param 'foo' %>
Access request parameters and routes captures.
<%= session 'foo' %>
Access session values.
<%= stash 'foo' %> <% stash foo => 'bar'; %>
Access stash values.
<%= url_for %> <%= url_for 'index' %> <%= url_for 'index', foo => 'bar' %>
Generate URLs.
Mojolicious::Plugin::DefaultHelpers inherits all methods from Mojolicious::Plugin and implements the following new ones.
register
$plugin->register;
Register helpers in Mojolicious application.
Mojolicious, Mojolicious::Guides, http://mojolicious.org.
To install Mojolicious, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious
CPAN shell
perl -MCPAN -e shell install Mojolicious
For more information on module installation, please visit the detailed CPAN module installation guide.