Mojolicious::Plugin::Module::Abstract - Abstract class for modules.
Abstract class for modules provides methods to init some aspects of modules such as routes, templates, configs, etc. Use it to define your modules.
Initialize module.
Current mojolicious application object.
Path to this module in filesystem.
Add templates paths to mojolicious renderer.
Looks for ./config/module.conf config in YAML format an load it. Also trying to load local config for this module from application config/vendor/module_name.yaml(YAML too). Configs will be merged.
./config/module.conf
config/vendor/module_name.yaml
You can get module's config this way:
$app->module->get('module_name')->config->{some_config_key}
Or directly from module object.
Path to this module in filesystem. Will be in config-{path}>.
config-
Override this method in your module and define routes.
Override this method in your module and define helpers.
Override this method in your module if module needs some more initialization code.
Mojolicious::Plugin::Module, Mojolicious::Guides, http://mojolicio.us.
Copyright (C) 2014, Georgy Bazhukov.
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.
To install Mojolicious::Plugin::Module, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::Module
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::Module
For more information on module installation, please visit the detailed CPAN module installation guide.