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 Class::Data::Inheritable);
__PACKAGE__->mk_classdata('file_map');
sub new {
my $class = shift;
my $config_name = $ENV{SLEDGE_CONFIG_NAME};
$config_name =~ s/^_//;
$class->SUPER::new($config_name, $class->file_map->{$config_name});
}
----
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
develop_kan:
tmpl_path: /path/to/template/proj
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.
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