Sledge::Config::YAML - The configuration file of Sledge can be written by using YAML.
package Your::Config; use basei qw(Sledge::Config::YAML); sub new { my $class = shift; $class->SUPER::new($ENV{SLEDGE_CONFIG_NAME}, $ENV{SLEDGE_CONFIG_FILE}); } ---- config.yaml --- common: datasource: - dbi:mysql:dbname - user - pass tmpl_path: /usr/local/proj/template info_addr: proj@example.com develop: datasource: - dbi:mysql:proj - dev_user - dev_pass session_servers: - 127.0.0.1:XXXXX cache_servers : - 127.0.0.1:XXXXX tmpl_path: __ENV:HOME__/project/template/proj develop_kan: host: proj.dev.example.com validator_message_file: /path/to/dev_conf/message.yaml info_addr: kan@example.com
The configuration file of Sledge can be written by using YAML.
You can use syntax `__ENV:(.+)__`. It's replaced with environment variable.
KAN Fushihara <kan at mobilefactory.jp>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Tokuhiro Matsuno
Sledge::Config
To install Sledge::Config::YAML, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sledge::Config::YAML
CPAN shell
perl -MCPAN -e shell install Sledge::Config::YAML
For more information on module installation, please visit the detailed CPAN module installation guide.