|
NAMEConfig::INI::Simple - provides quick access to the contents of .ini filesOnly dependency is File::Slurp. SYNOPSIS--------------- INI ---------------test=blah [section] section-entry=lol --------------- Code -------------- #read ini my $ini = Config::INI::Simple->new("test.ini"); print $ini->{_}->{test}, "\n"; print $ini->{section}->{"section-entry"}, "\n"; #write ini $ini = Config::INI::Simple->new(); $ini->{section1}->{key1} = "value1"; $ini->{section1}->{key2} = "value2"; $ini->write("test.ini"); DESCRIPTIONConfig::INI::Simple parses the .ini file at construction time and returns a hashref to the sections, which themselves are hashrefs to the sections' key value pairs.the top section, unless named is called "_" like in Config::INI::Reader. if no path is passed to new(), and empty object is returned which can be used to construct an ini and then write() it to a specific file. RATIONALConfig::INI::Reader depends on some uncommon packages, which themselves depend on other uncommon packages. Since my CPAN installer was somehow broken, I ended up installing its dozen of dependencies by hand. After wasting half an hour with manual package handling, i wrote my own little parser instead. This one only uses File::Slurp, which i consider a standard module.AUTHORTorsten GeyerSEE ALSOConfig::INI::ReaderCOPYRIGHT AND LICENSECopyright (C) 2011 by Torsten GeyerThis library is free software; you can redistribute it and/or modify it under the same terms as Perl5 itself.
Visit the GSP FreeBSD Man Page Interface. |