Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Config::INI::Simple(3)User Contributed Perl DocumentatioConfig::INI::Simple(3)

NAME
       Config::INI::Simple - provides quick access to the contents of .ini
       files

       Only 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");

DESCRIPTION
       Config::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.

RATIONAL
       Config::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.

AUTHOR
       Torsten Geyer

SEE ALSO
       Config::INI::Reader

COPYRIGHT AND LICENSE
       Copyright (C) 2011 by Torsten Geyer

       This library is free software; you can redistribute it and/or modify it
       under the same terms as Perl5 itself.

perl v5.32.0			  2011-10-28		Config::INI::Simple(3)

NAME | SYNOPSIS | DESCRIPTION | RATIONAL | AUTHOR | SEE ALSO | COPYRIGHT AND LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Config::INI::Simple&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help