++ed by:
MARKSTOS MISHIN TOBYINK

3 PAUSE user(s)
2 non-PAUSE user(s).

Yusuke Shibata

NAME

Cot::Plugin::Config - Cot configuration plugin

SYNOPSIS

For example,

    use Cot;
    use Cot::Plugin qw/Config/;

    get "/test" => sub {
        my $self = shift;
        my $db = $self->config->{'db'};
        ...
    };

Config yaml file($ENV{COT_ROOT}/config.yaml) is,

    development:
      db: dbi:mysql:diary:localhost

    production:
      db: dbi:mysql:diary:192.168.1.10

DESCRIPTION

Cot::Plugin::Config is an only build in Plugin is Cot framework. You can descsribe Config file(config.yaml) and call config method of Cot object. return the hash reference of config.yaml file $ENV{COT_ENV} entries data.

LICENSE

Copyright (C) Yusuke Shibata

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Yusuke Shibata <shibata@yusukeshibata.jp>




Hosting generously
sponsored by Bytemark