The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Sledge::Config::YAML - The configuration file of Sledge can be written by using YAML.

SYNOPSIS

   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

DESCRIPTION

The configuration file of Sledge can be written by using YAML.

METHODS

new

You can use syntax `__ENV:(.+)__`. It's replaced with environment variable.

AUTHOR

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.

THANKS TO

   Tokuhiro Matsuno

SEE ALSO

Sledge::Config