Mojolicious::Plugin::ConfigAny - Mojolicious Plugin for Config::Any support
version 0.1.3
# Mojolicious $self->plugin('ConfigAny'); $self->plugin(ConfigAny => { identifier => 'foo' # identifier for config directories prefix => 'bar' # config files prefix extensions => [ # file extensions to search qw(json yml perl) ] } ); # Mojolicious::Lite plugin 'ConfigAny';
Mojolicious::Plugin::ConfigAny is a Mojolicious plugin.
The plugin configration options listed as following:
identifier
Should be a string or not setted - plugin will use $app->moniker as default.
$app->moniker
prefix
Config file prefix, default is $app->moniker too.
extensions
This is an TODO option, an array reference that used as file extension, by default we use Config::Any->extensions in direct. If you want to set the extensions option, you could only use subset of them.
Config::Any->extensions
Mojolicious::Plugin::ConfigAny inherits all methods from Mojolicious::Plugin and implements the following new ones.
Mojolicious::Plugin::ConfigAny will generate a helper listing all avaliable config directories.
Mojolicious::Plugin::ConfigAny will generate a helper listing all avaliable config files.
$plugin->register(Mojolicious->new);
Register plugin in Mojolicious application.
Config::Any, File::ConfigDir, Mojolicious, Mojolicious::Guides, http://mojolicio.us.
Huo Linhe <huolinhe@berrygenomics.com>
This software is copyright (c) 2015 by Berry Genomics.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Mojolicious::Plugin::ConfigAny, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::ConfigAny
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::ConfigAny
For more information on module installation, please visit the detailed CPAN module installation guide.