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'; # Everything can be customized with options plugin yaml_config => { file => '/etc/myapp.conf', class => 'YAML::XS' };
Look at Mojolicious::Plugin::JSONConfig and replace "JSONConfig" with "yaml_config" and you should be fine. :)
YAML::Tiny is the default parser. It doesn't even try to implement the full YAML spec. Currently you can use YAML::PP, YAML::XS, YAML::Old and YAML via the class option to parse the data with a more advanced YAML parser.
class
Danijel Tasov <cpan@rbfh.de>
Mojolicious, Mojolicious::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.