Mojolicious::Plugin::Module - Mojolicious Plugin.
Mojolicious::Plugin::Module is a Mojolicious plugin. This module helps to write more modular applications with Mojo.
After
$app->plugin('Module');
Mojolicious looks for config/application.yaml where you can define (in YAML format) modules which should be used.
config/application.yaml
For example application.yaml contains
application.yaml
--- modules: - Bugov::User - Bugov::CommonModule
Two modules will used. They should be located in module/bugov/user and module/bugov/common_module directories.
module/bugov/user
module/bugov/common_module
assets # Module's public files. config # Some configs. module.yaml # Main config of this module. lib Vendor ModuleName ... controllers, helpers, etc ... # The same what you can do in Mojolicious App. ModuleName.pm # Should extends Mojolicious::Plugin::Module::Abstract. templates vendor module_name ... templates ... # Templates used in this module.
$name - required parameter. Defines package of module. For example "Vendor::ModuleName".
$name
$module - optional parameter. Module object which be finded as $name in module manager. If <$module> does not defined $name will be loaded.
$module
Get module by $name.
Mojolicious::Plugin::Module::Abstract, Mojolicious::Plugin::Module::Manager, Mojolicious::Plugin::Module::Assets, 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.