Config::Setting::IniParser - parse windows .ini style files.
use Config::Setting::IniParser; my $ini = Config::Setting::IniParser->new(Filename => $inifile); foreach my $s ($ini->sections()) { print "[$s]\n"; foreach my $k ($ini->keylist($s)) { print $k, "=", $ini->get($s, $k), "\n"; } print "\n"; }
This class provides OO access to windows .ini style files. At present, it only provides read access, not writing.
Instantiate a new object. ARGS is a set of keyword / value pairs. Recognised options are:
Pass in a character that is used as a comment inside the data. This defaults to "#", but is also commonly ";".
Parse FILENAME into the object.
Parse STRING into the object.
Return a list of all sections that occurred in the data. They are returned in the order in which they originally occurred.
Return a list of all keys in SECTION.
Return the value of KEY in SECTION.
perl(1).
Dominic Mitchell, <cpan (at) happygiraffe.net>.
Does not cater for quoted keys and values.
It is a bit eager about comment stripping.
To install Config::Setting, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Config::Setting
CPAN shell
perl -MCPAN -e shell install Config::Setting
For more information on module installation, please visit the detailed CPAN module installation guide.