.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Config::INI 3pm" .TH Config::INI 3pm "2020-12-28" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Config::INI \- simple .ini\-file format .SH "VERSION" .IX Header "VERSION" version 0.025 .SH "SYNOPSIS" .IX Header "SYNOPSIS" Config-INI comes with code for reading \fI.ini\fR files: .PP .Vb 1 \& my $config_hash = Config::INI::Reader\->read_file(\*(Aqconfig.ini\*(Aq); .Ve .PP \&...and for writing \f(CW\*(C`.ini\*(C'\fR files: .PP .Vb 1 \& Config::INI::Writer\->write_file({ somekey => \*(Aqsomevalue\*(Aq }, \*(Aqconfig.ini\*(Aq); .Ve .PP See Config::INI::Writer and Config::INI::Reader for more examples. .SH "GRAMMAR" .IX Header "GRAMMAR" This section describes the format parsed and produced by Config::INI::Reader and ::Writer. It is not an exhaustive and rigorously tested formal grammar, it's just a description of this particular implementation of the not-quite-standardized \*(L"\s-1INI\*(R"\s0 format. .PP .Vb 1 \& ini\-file = {
| } \& \& empty\-line = [ ] \& \& section = { | } \& \& section\-header = [ ] "[" "]" [ ] \& section\-name = string \& \& value\-assignment = [ ] [ ] \& "=" \& [ ] [ ] \& \& property\-name = string\-without\-equals \& value = string \& \& comment = ";" [ ] \& line\-ending = [ ] \& \& space = ( | " " ) * \& string\-without\-equals = string \- "=" \& string = ? 1+ characters; not ";" or EOL; begins and ends with non\-space ? .Ve .PP Of special note is the fact that \fIno\fR escaping mechanism is defined, meaning that there is no way to include an \s-1EOL\s0 or semicolon (for example) in a value, property name, or section name. If you need this, either subclass, wait for a subclass to be written for you, or find one of the many other INI-style parsers on the \s-1CPAN.\s0 .PP The order of sections and value assignments within a section are not significant, except that given multiple assignments to one property name within a section, only the final one is used. A section name may be used more than once; this will have the identical meaning as having all property assignments in all sections of that name in sequence. .SH "DON'T FORGET" .IX Header "DON'T FORGET" The definitions above refer to the format used by the Reader and Writer classes bundled in the Config-INI distribution. These classes are designed for easy subclassing, so it should be easy to replace their behavior with whatever behavior your want. .PP Patches, feature requests, and bug reports are welcome \*(-- but I'm more interested in making sure you can write a subclass that does what you need, and less in making Config-INI do what you want directly. .SH "THANKS" .IX Header "THANKS" Thanks to Florian Ragwitz for improving the subclassability of Config-INI's modules, and for helping me do some of my first merging with \fBgit\fR\|(7). .SH "ORIGIN" .IX Header "ORIGIN" Originaly derived from Config::Tiny, by Adam Kennedy. .SH "AUTHOR" .IX Header "AUTHOR" Ricardo Signes .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2007 by Ricardo Signes. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.