Name : perl-Config-Onion
| |
Version : 1.007
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp155.1.1
| Date : 2023-07-20 19:38:03
|
Group : Development/Libraries/Perl
| Source RPM : perl-Config-Onion-1.007-lp155.1.1.src.rpm
|
Size : 0.04 MB
| |
Packager : https://www_suse_com/
| |
Summary : Layered configuration, because configs are like ogres
|
Description :
All too often, configuration is not a universal or one-time thing, yet most configuration-handling treats it as such. Perhaps you can only load one config file. If you can load more than one, you often have to load all of them at the same time or each is stored completely independently, preventing one from being able to override another. Config::Onion changes that.
Config::Onion stores all configuration settings in four layers: Defaults, Main, Local, and Override. Each layer can be added to as many times as you like. Within each layer, settings which are given multiple times will take the last specified value, while those which are not repeated will remain untouched.
$cfg->set_default(name => \'Arthur Dent\', location => \'Earth\'); $cfg->set_default(location => \'Magrathea\');
Regardless of the order in which they are set, values in Main will always override values in the Default layer, the Local layer always overrides both Default and Main, and the Override layer overrides all the others.
The design intent for each layer is:
* * Default
Hardcoded default values to be used when no further configuration is present
* * Main
Values loaded from standard configuration files shipped with the application
* * Local
Values loaded from local configuration files which are kept separate to prevent them from being overwritten by application upgrades, etc.
* * Override
Settings provided at run-time which take precendence over all configuration files, such as settings provided via command line switches
If a higher-priority layer wishes to completely remove a hash entry made by a lower-priority layer (i.e., delete the hash key, not just set it to an empty value), it can do so by setting the value to \"!DELETE!\". This only applies to hash entries, not array values, as the entire array already needs to be overwritten to make any changes to it. Also, if, for some reason, the configuration contains objects, the contents of those objects will be ignored for the sake of encapsulation. Only unblessed hashes are cleaned in this manner.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-C/15.5/noarch |