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

NAME

CallBackery::Model::ConfigJsonSchema - get parse configuration file for CallBackery

SYNOPSIS

 use CallBackery::Model::ConfigYAML;
 my $cfg = CallBackery::Config->new(file=>$file);
 my $hash_ref = $cfg->cfgHash();
 my $pod = $cfg->pod();

DESCRIPTION

CallBackery gets much of its configuration from this config file.

cfgHash

a hash containing the data from the config file

cfgHash

a hash containing the data from the config file. If the environment variable CM_CB_OVERRIDE_... is set, the value from the config file is overridden with the value from the environment. All config key characters outside of [0-9a-zA-Z] are replaced with _. Note that you can only override settings that exist in the config file, you can not create new settings.

Example config file:

  BACKEND:
    cfg-db: 'dbi:SQLite:dbname=/opt/running/cb.db'
  LIST:
    - hello
    - world
    

Example environment override:

    export CB_CFG_OVERRIDE_BACKEND_cfg_db='dbi:SQLite:dbname=/tmp/cb.db'
    export CB_CFG_OVERRIDE_LIST_0='goodbye'

pod

returns a pod documenting the config file

postProcessCfg

Post process the configuration data into a format that is easily used by the application.

COPYRIGHT

Copyright (c) 2020 by OETIKER+PARTNER AG. All rights reserved.

AUTHOR

Tobias Oetiker <tobi@oetiker.ch>

HISTORY

 2020-02-18 to 1.0 first version
 2020-11-20 fz 1.1 call postProcessCfg from CallBackery.pm