NAME

Ado::Manual::Plugins - Ado plugins and how to write an Ado::Plugin

DESCRIPTION

There is almost nothing special about writing an Ado::Plugin. The only difference between Ado and Mojolicious plugins is that Ado plugins can retrieve their settings from their own files.

The files must be named after the plugins for which they contain configuration. A plugin Ado::Plugin::Hello will search its configuration in app->home->rel_dir('etc/plugins/hello.conf'). depending on the current mode ($ENV{MOJO_MODE}) the file app->home->rel_dir('etc/plugins/hello.$ENV{MOJO_MODE}.conf') will also be loaded and will overwrite all settings from app->home->rel_dir('etc/plugins/hello.conf'). The file must return a HASHREF. See the code of the listed plugins below for examples of how and what can be done in a plugin.

Ado can be stripped down to a bare Mojolicious application by not loading any Ado plugins. And Ado can be extended infinitely just by adding helpers, conditions, routes, templates and injecting code into hooks from plugins. This is true for any Mojolicious application.

PLUGINS

Ado comes with the following default plugins.

Ado::Plugin::AdoHelpers

Default Ado helpers

Ado::Plugin::Auth

Authenticate users.

Ado::Plugin::MarkDownRenderer

Render markdown to HTML.

Ado::Plugin::Routes

Keep routes in their own configuration file separately.

Ado::Control::Test

A controller used for testing Ado.

SPONSORS

The original author

SEE ALSO

Mojolicious::Plugins, Mojolicious::Plugin,

AUTHOR

Красимир Беров (Krasimir Berov)

COPYRIGHT AND LICENSE

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.