Eugene Ponizovsky

NAME

App::Environ::Config - Configuration files processor for App::Environ

SYNOPSIS

  use App::Environ;
  use App::Environ::Config;

  App::Environ::Config->register( qw( foo.yml bar.json ) );

  App::Environ->send_event('initialize');

  my $config = App::Environ::Config->instance;

DESCRIPTION

App::Environ::Config is the configuration files processor for App::Environ. Allows get access to configuration tree from different application components.

The module registers in App::Environ three handlers for following events: initialize, reload and finalize:r.

METHODS

register( @config_sections )

The method registers configuration sections.

instance()

Gets reference to configuration tree.

ENVIRONMENT VARIABLES

You can control configuration file processing using environment variables.

APPCONF_DIRS

List of directories separated by ":" (colon), in which configuration processor will search files. If the variable not specified, current directory will be used.

APPCONF_INTERPOLATE_VARIABLES

Enables or disables variable interpolation in configurations files. Enabled by default.

APPCONF_PROCESS_DIRECTIVES

Enables or disables directive processing in configuration files. Enabled by default.

APPCONF_EXPORT_ENV

Enables or disables environment variables exporting to configuration tree. If enabled, environment variables can be accessed by the key ENV from the configuration tree and can be interpolated into other configuration parameters.

Disabled by default.

SEE ALSO

App::Environ, Config::Processor

AUTHOR

Eugene Ponizovsky, <ponizovsky@gmail.com>

COPYRIGHT AND LICENSE

Copyright (c) 2016-2017, Eugene Ponizovsky, <ponizovsky@gmail.com>. All rights reserved.

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