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

NAME

Jedi::Role::Config - Easy load of config file by env

VERSION

version 0.08

DESCRIPTION

We will try to load the config into the current directory and try all parents.

The sub env is loaded using the jedi_env.

Ex:

  PLACK_ENV = test

Load config.* environments/test.*

The config is merged together, so the "test" file replace keys from the main config.

Ex:

  config.yml

     test: 1
     hello: 2

  environments/test.yml

     test: 2
     world: 1

The jedi_config is set to :

   {
         test => 2,
         hello => 2,
         world => 1,
   }

ATTRIBUTES

jedi_app_root

This attribute set the root of your app based on the config files.

It try to look for "config.*" or "environments/$jedi_env.*" and set the root app to this.

If nothing found, the root app will be the current dir of the module.

jedi_config_files

The config files found based on the root apps

jedi_env

Environment of your jedi app.

It take : JEDI_ENV or PLACK_ENV or set 'development' by default

jedi_config

Load config from current app dir or any subdir above.

It also take 'environments/$JEDI_ENV' file.

SEE ALSO

Config::Any

BUGS

Please report any bugs or feature requests on the bugtracker website https://tasks.celogeek.com/projects/perl-modules-jedi

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

celogeek <me@celogeek.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by celogeek <me@celogeek.com>.

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