Mojolicious::Plugin::YamlConfig - YAML Configuration Plugin
# myapp.yaml -- foo: "bar" music_dir: "<%= app->home->rel_dir('music') %>" # Mojolicious $self->plugin('yaml_config'); # Mojolicious::Lite plugin 'yaml_config'; # Reads myapp.yaml by default and puts the parsed version into the stash my $config = $self->stash('config'); # Everything can be customized with options my $config = plugin yaml_config => { file => '/etc/myapp.conf', stash_key => 'conf' };
Look at Mojolicious::Plugin::JsonConfig and replace "json" with "yaml" and you should be fine. :)
Danijel Tasov <data@cpan.org>
Mojolicious, Mojolicous::Plugin::JsonConfig, Mojolicious::Guides
To install Mojolicious::Plugin::YamlConfig, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::YamlConfig
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::YamlConfig
For more information on module installation, please visit the detailed CPAN module installation guide.