Tapper Team > Tapper-Config-4.1.3 > Tapper::Config

Download:
Tapper-Config-4.1.3.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: 4.1.3   Source  

NAME ^

Tapper::Config - Tapper - Context sensitive configuration hub for all Tapper libs

SYNOPSIS ^

 use Tapper::Config;
 say Tapper::Config->subconfig->{test_value};
 say Tapper::Config->subconfig->{paths}{build_conf_path};

default_merge

Merges default values from /etc/tapper into the config. This allows to overwrite values given from the config provided with the module. It searches for config in the following places. * filename given in $ENV{TAPPER_CONFIG_FILE} * $ENV{HOME}/.tapper/tapper.cfg * /etc/tapper.cfg

If $ENV{TAPPER_CONFIG_FILE} exists it will be used no matter if it contains an existing file. If this key does not exists the first file found from the list of remaining alternatives is used.

@param hash ref - config

@return hash ref - merged config

Environment merge

Depending on environment variables a context of life, test, or development is derived. Default is live. If HARNESS_ACTIVE is set the context is test, if TAPPER_DEVELOPMENT is set to 1 the context is development.

This context is used for creating the final config. Inside the config all keys under development or test are merged up into the main level. Therefore usually there you put special values overriding defaults.

Special entries

There are entries that are handled in special way:

files.log4perl_cfg

This local path/file entry is prepended by the sharedir path of Tapper::Config to make it an absolute path.

database

When the environment variable TAPPERDBMS is set to postgresql (or mysql) then the config values for database.TestrunDB, database.ReportsDB, and database.HardwareDB are overwritten by the values <database.by_TAPPERDBMS.postgresql.TestrunDB>, <database.by_TAPPERDBMS.postgresql.ReportsDB>, <database.by_TAPPERDBMS.postgresql.HardwareDB>, respectively.

This introduces a backwards compatible way of using another DBMS with Tapper, in particular PostgreSQL.

These special entries are prepared after the default and context merges.

subconfig

Return the actual config for the current context.

AUTHOR ^

AMD OSRC Tapper Team <tapper@amd64.org>

COPYRIGHT AND LICENSE ^

This software is Copyright (c) 2012 by Advanced Micro Devices, Inc..

This is free software, licensed under:

  The (two-clause) FreeBSD License
syntax highlighting: