Name : perl-Config-Simple-Conf
| |
Version : 2.007
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp155.1.1
| Date : 2023-07-20 19:33:50
|
Group : Unspecified
| Source RPM : perl-Config-Simple-Conf-2.007-lp155.1.1.src.rpm
|
Size : 0.03 MB
| |
Packager : https://www_suse_com/
| |
Summary : Fast and Lightweight Configuration File Handler
|
Description :
The idea behind Config::Simple::Conf came from various INI style parsers I\'ve used in the past. In general these have worked well with the exception of lack of complex configuration handling.
Config::Simple for example fails to account for common cases which are extremely useful in any configuration file. These include useful handling of duplicate keys (currently Config::Simple blows them away without any notice), and second, internal macros.
In many of my usage cases I want something like your standard .INI file format, with the above mentioned exceptions.
[core section]
path = /root/to/my/stuff
[section name]
path = [core section:path]/abc path = [core section:path]/xyz
Such a configuration would allow me to do two things, establish a core path argument, which is then used in other sections, and have a section with multiple duplicate entires as a list.
An example of the code here would look something like:
use strict; use Config::Simple::Conf;
my $conf = Config::Simple::Conf->new(\'/path/to/my.conf\');
print \"My root is: \" . $conf->value(\'core section\', \'path\') . \"\ \"; print \"My section paths are:\ \";
for($conf->value(\'section name\', \'path\')){ print \"\\t$_\ \"; }
With the resulting output looking something like:
My root is: /root/to/my/stuff My section paths are: /root/to/my/stuff/abc /root/to/my/stuff/xyz
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-C/15.5/noarch |