Name : perl-Tie-Cfg
| |
Version : 0.32
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp154.6.1
| Date : 2023-01-27 18:22:38
|
Group : Development/Libraries/Perl
| Source RPM : perl-Tie-Cfg-0.32-lp154.6.1.src.rpm
|
Size : 0.01 MB
| |
Packager : https://www_suse_com/
| |
Summary : Ties simple configuration (.ini) files to hashes.
|
Description :
This module reads in a configuration file at \'tie\' and writes it at \'untie\'.
You can use file locking to prevent others from accessing the configuration file, but this should only be used if the configuration file is used as a small data file to hold a few entries that can be concurrently accessed. Note! In this case a persistent \".lock\" file will be created.
Mode is used to set access permissions; defaults to 0640. It\'s only set if a file should be written (i.e. using the WRITE keyword).
INIMODE lets you choose between Windows alike .ini configuration files and simple key[:=]value entried files.
Sections are addressed using a hash within a hash: For a tied %cfg the assignment:
$cfg{\"section\"}{\"key\"}=\"value\"
will write in the configuration file:
[section] key=value
Keys that end on [\\[][0-9]+[\\]] will be interpreted as arrays and will show up in the tied hash as an array element. For example:
[array-section] var[0]=1 var[1]=2 var[2]=3
will show up in a tied %cfg hash like:
for (0..2) { print $cfg{\"array-section\"}{\"var\"}[$_],\"\ \"; }
Hashes of hashes are permitted:
$cfg{\"key\"}{\"subkey\"}{\"subsubkey\"}{\"subsubsubkey\"}{\"par\"}=\"value\";
will show up in the configuration file as:
[key.subkey.subsubkey.subsubsubkey] par=value
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-T/15.4/noarch |