Ado::Plugin::AdoHelpers - Default Ado helpers plugin
# Ado $self->plugin('AdoHelpers'); # Mojolicious::Lite plugin 'AdoHelpers';
Ado::Plugin::AdoHelpers is a collection of renderer helpers for Ado.
This is a core plugin, that means it is always enabled and its code a good example for learning to build new plugins, you're welcome to fork it.
See "PLUGINS" in Ado::Manual::Plugins for a list of plugins that are available by default.
Ado::Plugin::AdoHelpers implements the following helpers.
Returns the current user - guest for not authenticated users.
guest
$c->user(Ado::Model::Users->query("SELECT * from users WHERE login_name='guest'")); #in a controller action: my $current_user = $c->user; #in a template: <h1>Hello, <%=user->name%>!</h1>
Ado::Plugin::AdoHelpers inherits all methods from Ado::Plugin and implements the following new ones.
$plugin->register(Ado->new);
Register helpers in Ado application.
Ado::Plugin, Mojolicious::Plugins, Mojolicious::Plugin,
Красимир Беров (Krasimir Berov)
Copyright 2013-2014 Красимир Беров (Krasimir Berov).
This program is free software, you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License v3 (LGPL-3.0). You may copy, distribute and modify the software provided that modifications are open source. However, software that includes the license may release under a different license.
See http://opensource.org/licenses/lgpl-3.0.html for more information.
To install Ado, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Ado
CPAN shell
perl -MCPAN -e shell install Ado
For more information on module installation, please visit the detailed CPAN module installation guide.