1Config::IniFiles(3) User Contributed Perl Documentation Config::IniFiles(3)
2
3
4
6 Config::IniFiles - A module for reading .ini-style configuration files.
7
9 use Config::IniFiles;
10 my $cfg = Config::IniFiles->new( -file => "/path/configfile.ini" );
11 print "The value is " . $cfg->val( 'Section', 'Parameter' ) . "."
12 if $cfg->val( 'Section', 'Parameter' );
13
15 Config::IniFiles provides a way to have readable configuration files
16 outside your Perl script. Configurations can be imported (inherited,
17 stacked,...), sections can be grouped, and settings can be accessed
18 from a tied hash.
19
21 INI files consist of a number of sections, each preceded with the
22 section name in square brackets, followed by parameter names and their
23 values.
24
25 [a section]
26 Parameter=Value
27
28 [section 2]
29 AnotherParameter=Some value
30 Setting=Something else
31 Parameter=Different scope than the one in the first section
32
33 The first non-blank character of the line indicating a section must be
34 a left bracket and the last non-blank character of a line indicating a
35 section must be a right bracket. The characters making up the section
36 name can be any symbols at all. However section names must be unique.
37
38 Parameters are specified in each section as Name=Value. Any spaces
39 around the equals sign will be ignored, and the value extends to the
40 end of the line (including any whitespace at the end of the line.
41 Parameter names are localized to the namespace of the section, but must
42 be unique within a section.
43
44 Both the hash mark (#) and the semicolon (;) are comment characters.
45 by default (this can be changed by configuration). Lines that begin
46 with either of these characters will be ignored. Any amount of
47 whitespace may precede the comment character.
48
49 Multi-line or multi-valued parameters may also be defined ala UNIX
50 "here document" syntax:
51
52 Parameter=<<EOT
53 value/line 1
54 value/line 2
55 EOT
56
57 You may use any string you want in place of "EOT". Note that whatever
58 follows the "<<" and what appears at the end of the text MUST match
59 exactly, including any trailing whitespace.
60
61 Alternately, as a configuration option (default is off), continuation
62 lines can be allowed:
63
64 [Section]
65 Parameter=this parameter \
66 spreads across \
67 a few lines
68
70 Get a new Config::IniFiles object with the new method:
71
72 $cfg = Config::IniFiles->new( -file => "/path/config_file.ini" );
73 $cfg = new Config::IniFiles -file => "/path/config_file.ini";
74
75 Optional named parameters may be specified after the configuration file
76 name. See the new in the METHODS section, below.
77
78 Values from the config file are fetched with the val method:
79
80 $value = $cfg->val('Section', 'Parameter');
81
82 If you want a multi-line/value field returned as an array, just specify
83 an array as the receiver:
84
85 @values = $cfg->val('Section', 'Parameter');
86
88 new ( [-option=>value ...] )
89 Returns a new configuration object (or "undef" if the configuration
90 file has an error, in which case check the global
91 @Config::IniFiles::errors array for reasons why). One Config::IniFiles
92 object is required per configuration file. The following named
93 parameters are available:
94
95 -file filename
96 Specifies a file to load the parameters from. This 'file' may
97 actually be any of the following things:
98
99 1) the pathname of a file
100
101 $cfg = Config::IniFiles->new( -file => "/path/to/config_file.ini" );
102
103 2) a simple filehandle
104
105 $cfg = Config::IniFiles->new( -file => STDIN );
106
107 3) a filehandle glob
108
109 open( CONFIG, "/path/to/config_file.ini" );
110 $cfg = Config::IniFiles->new( -file => *CONFIG );
111
112 4) a reference to a glob
113
114 open( CONFIG, "/path/to/config_file.ini" );
115 $cfg = Config::IniFiles->new( -file => \*CONFIG );
116
117 5) an IO::File object
118
119 $io = IO::File->new( "/path/to/config_file.ini" );
120 $cfg = Config::IniFiles->new( -file => $io );
121
122 or
123
124 open my $fh, '<', "/path/to/config_file.ini" or die $!;
125 $cfg = Config::IniFiles->new( -file => $fh );
126
127 6) A reference to a scalar (requires newer versions of IO::Scalar)
128
129 $ini_file_contents = <<EOT
130 [section name]
131 Parameter=A value
132 Setting=Another value
133 EOT
134
135 $cfg = Config::IniFiles->new( -file => \$ini_file_contents );
136
137 If this option is not specified, (i.e. you are creating a
138 config file from scratch) you must specify a target file
139 using SetFileName in order to save the parameters.
140
141 -default section
142 Specifies a section to be used for default values. For
143 example, in the following configuration file, if you look up
144 the "permissions" parameter in the "joe" section, there is
145 none.
146
147 [all]
148 permissions=Nothing
149
150 [jane]
151 name=Jane
152 permissions=Open files
153
154 [joe]
155 name=Joseph
156
157 If you create your Config::IniFiles object with a default
158 section of "all" like this:
159
160 $cfg = Config::IniFiles->new( -file => "file.ini", -default => "all" );
161
162 Then requsting a value for a "permissions" in the [joe]
163 section will check for a value from [all] before returning
164 undef.
165
166 $permissions = $cfg->val( "joe", "permissions"); // returns "Nothing"
167
168 -fallback section
169 Specifies a section to be used for parameters outside a
170 section. Default is none. Without -fallback specified (which
171 is the default), reading a configuration file which has a
172 parameter outside a section will fail. With this set to, say,
173 "GENERAL", this configuration:
174
175 wrong=wronger
176
177 [joe]
178 name=Joseph
179
180 will be assumed as:
181
182 [GENERAL]
183 wrong=wronger
184
185 [joe]
186 name=Joseph
187
188 Note that Config::IniFiles will also omit the fallback
189 section header when outputing such configuration.
190
191 -nocase 0|1
192 Set -nocase => 1 to handle the config file in a case-
193 insensitive manner (case in values is preserved, however).
194 By default, config files are case-sensitive (i.e., a section
195 named 'Test' is not the same as a section named 'test').
196 Note that there is an added overhead for turning off case
197 sensitivity.
198
199 -import object
200 This allows you to import or inherit existing setting from
201 another Config::IniFiles object. When importing settings from
202 another object, sections with the same name will be merged
203 and parameters that are defined in both the imported object
204 and the -file will take the value of given in the -file.
205
206 If a -default section is also given on this call, and it does
207 not coincide with the default of the imported object, the new
208 default section will be used instead. If no -default section
209 is given, then the default of the imported object will be
210 used.
211
212 -allowcontinue 0|1
213 Set -allowcontinue => 1 to enable continuation lines in the
214 config file. i.e. if a line ends with a backslash "\", then
215 the following line is appended to the parameter value,
216 dropping the backslash and the newline character(s).
217
218 Default behavior is to keep a trailing backslash "\" as a
219 parameter value. Note that continuation cannot be mixed with
220 the "here" value syntax.
221
222 -allowempty 0|1
223 If set to 1, then empty files are allowed at /ReadConfig
224 time. If set to 0 (the default), an empty configuration file
225 is considered an error.
226
227 -negativedeltas 0|1
228 If set to 1 (the default if importing this object from
229 another one), parses and honors lines of the following form
230 in the configuration file:
231
232 ; [somesection] is deleted
233
234 or
235
236 [inthissection]
237 ; thisparameter is deleted
238
239 If set to 0 (the default if not importing), these comments
240 are treated like ordinary ones.
241
242 The /WriteConfig1)> form will output such comments to
243 indicate deleted sections or parameters. This way, reloading
244 a delta file using the same imported object produces the same
245 results in memory again. See " DELTA FEATURES" in IMPORT for
246 more details.
247
248 -commentchar 'char'
249 The default comment character is "#". You may change this by
250 specifying this option to another character. This can be any
251 character except alphanumeric characters, square brackets or
252 the "equal" sign.
253
254 -allowedcommentchars 'chars'
255 Allowed default comment characters are "#" and ";". By
256 specifying this option you may change the range of characters
257 that are used to denote a comment line to include any set of
258 characters
259
260 Note: that the character specified by -commentchar (see
261 above) is always part of the allowed comment characters.
262
263 Note 2: The given string is evaluated as a regular expression
264 character class, so '\' must be escaped if you wish to use
265 it.
266
267 -reloadwarn 0|1
268 Set -reloadwarn => 1 to enable a warning message (output to
269 STDERR) whenever the config file is reloaded. The reload
270 message is of the form:
271
272 PID <PID> reloading config file <file> at YYYY.MM.DD HH:MM:SS
273
274 Default behavior is to not warn (i.e. -reloadwarn => 0).
275
276 This is generally only useful when using Config::IniFiles in
277 a server or daemon application. The application is still
278 responsible for determining when the object is to be
279 reloaded.
280
281 -nomultiline 0|1
282 Set -nomultiline => 1 to output multi-valued parameter as:
283
284 param=value1
285 param=value2
286
287 instead of the default:
288
289 param=<<EOT
290 value1
291 value2
292 EOT
293
294 As the later might not be compatible with all applications.
295
296 -handle_trailing_comment 0|1
297 Set -handle_trailing_comment => 1 to enable support of
298 parameter trailing comments.
299
300 For example, if we have a parameter line like this:
301
302 param1=value1;comment1
303
304 by default, handle_trailing_comment will be set to 0, and we
305 will get value1;comment1 as the value of param1. If we have
306 -handle_trailing_comment set to 1, then we will get value1 as
307 the value for param1, and comment1 as the trailing comment of
308 param1.
309
310 Set and get methods for trailing comments are provided as
311 "SetParameterTrailingComment" and
312 "GetParameterTrailingComment".
313
314 val ($section, $parameter [, $default] )
315 Returns the value of the specified parameter ($parameter) in section
316 $section, returns undef (or $default if specified) if no section or no
317 parameter for the given section exists.
318
319 If you want a multi-line/value field returned as an array, just specify
320 an array as the receiver:
321
322 @values = $cfg->val('Section', 'Parameter');
323
324 A multi-line/value field that is returned in a scalar context will be
325 joined using $/ (input record separator, default is \n) if defined,
326 otherwise the values will be joined using \n.
327
328 exists($section, $parameter)
329 True if and only if there exists a section $section, with a parameter
330 $parameter inside, not counting default values.
331
332 push ($section, $parameter, $value, [ $value2, ...])
333 Pushes new values at the end of existing value(s) of parameter
334 $parameter in section $section. See below for methods to write the new
335 configuration back out to a file.
336
337 You may not set a parameter that didn't exist in the original
338 configuration file. push will return undef if this is attempted. See
339 newval below to do this. Otherwise, it returns 1.
340
341 setval ($section, $parameter, $value, [ $value2, ... ])
342 Sets the value of parameter $parameter in section $section to $value
343 (or to a set of values). See below for methods to write the new
344 configuration back out to a file.
345
346 You may not set a parameter that didn't exist in the original
347 configuration file. setval will return undef if this is attempted. See
348 newval below to do this. Otherwise, it returns 1.
349
350 newval($section, $parameter, $value [, $value2, ...])
351 Assignes a new value, $value (or set of values) to the parameter
352 $parameter in section $section in the configuration file.
353
354 delval($section, $parameter)
355 Deletes the specified parameter from the configuration file
356
357 ReadConfig
358 Forces the configuration file to be re-read. Returns undef if the file
359 can not be opened, no filename was defined (with the "-file" option)
360 when the object was constructed, or an error occurred while reading.
361
362 If an error occurs while parsing the INI file the
363 @Config::IniFiles::errors array will contain messages that might help
364 you figure out where the problem is in the file.
365
366 Sections
367 Returns an array containing section names in the configuration file.
368 If the nocase option was turned on when the config object was created,
369 the section names will be returned in lowercase.
370
371 SectionExists ( $sect_name )
372 Returns 1 if the specified section exists in the INI file, 0 otherwise
373 (undefined if section_name is not defined).
374
375 AddSection ( $sect_name )
376 Ensures that the named section exists in the INI file. If the section
377 already exists, nothing is done. In this case, the "new" section will
378 possibly contain data already.
379
380 If you really need to have a new section with no parameters in it,
381 check that the name that you're adding isn't in the list of sections
382 already.
383
384 DeleteSection ( $sect_name )
385 Completely removes the entire section from the configuration.
386
387 Parameters ($sect_name)
388 Returns an array containing the parameters contained in the specified
389 section.
390
391 Groups
392 Returns an array containing the names of available groups.
393
394 Groups are specified in the config file as new sections of the form
395
396 [GroupName MemberName]
397
398 This is useful for building up lists. Note that parameters within a
399 "member" section are referenced normally (i.e., the section name is
400 still "Groupname Membername", including the space) - the concept of
401 Groups is to aid people building more complex configuration files.
402
403 SetGroupMember ( $sect )
404 Makes sure that the specified section is a member of the appropriate
405 group.
406
407 Only intended for use in newval.
408
409 RemoveGroupMember ( $sect )
410 Makes sure that the specified section is no longer a member of the
411 appropriate group. Only intended for use in DeleteSection.
412
413 GroupMembers ($group)
414 Returns an array containing the members of specified $group. Each
415 element of the array is a section name. For example, given the sections
416
417 [Group Element 1]
418 ...
419
420 [Group Element 2]
421 ...
422
423 GroupMembers would return ("Group Element 1", "Group Element 2").
424
425 SetWriteMode ($mode)
426 Sets the mode (permissions) to use when writing the INI file.
427
428 $mode must be a string representation of the octal mode.
429
430 GetWriteMode ($mode)
431 Gets the current mode (permissions) to use when writing the INI file.
432
433 $mode is a string representation of the octal mode.
434
435 WriteConfig ($filename [, %options])
436 Writes out a new copy of the configuration file. A temporary file
437 (ending in '-new') is written out and then renamed to the specified
438 filename. Also see BUGS below.
439
440 If "-delta" is set to a true value in %options, and this object was
441 imported from another (see "new"), only the differences between this
442 object and the imported one will be recorded. Negative deltas will be
443 encoded into comments, so that a subsequent invocation of new() with
444 the same imported object produces the same results (see the
445 -negativedeltas option in "new").
446
447 %options is not required.
448
449 Returns true on success, "undef" on failure.
450
451 RewriteConfig
452 Same as WriteConfig, but specifies that the original configuration file
453 should be rewritten.
454
455 GetFileName
456 Returns the filename associated with this INI file.
457
458 If no filename has been specified, returns undef.
459
460 SetFileName ($filename)
461 If you created the Config::IniFiles object without initialising from a
462 file, or if you just want to change the name of the file to use for
463 ReadConfig/RewriteConfig from now on, use this method.
464
465 Returns $filename if that was a valid name, undef otherwise.
466
467 $ini->OutputConfig($delta)
468 Writes OutputConfig to STDOUT. Use select() to redirect STDOUT to the
469 output target before calling this function. Optional argument should be
470 set to 1 if writing only delta.
471
472 SetSectionComment($section, @comment)
473 Sets the comment for section $section to the lines contained in
474 @comment.
475
476 Each comment line will be prepended with the comment character (default
477 is "#") if it doesn't already have a comment character (ie: if the line
478 does not start with whitespace followed by an allowed comment
479 character, default is "#" and ";").
480
481 To clear a section comment, use DeleteSectionComment ($section)
482
483 GetSectionComment ($section)
484 Returns a list of lines, being the comment attached to section
485 $section. In scalar context, returns a string containing the lines of
486 the comment separated by newlines.
487
488 The lines are presented as-is, with whatever comment character was
489 originally used on that line.
490
491 DeleteSectionComment ($section)
492 Removes the comment for the specified section.
493
494 SetParameterComment ($section, $parameter, @comment)
495 Sets the comment attached to a particular parameter.
496
497 Any line of @comment that does not have a comment character will be
498 prepended with one. See "SetSectionComment($section, @comment)" above
499
500 GetParameterComment ($section, $parameter)
501 Gets the comment attached to a parameter. In list context returns all
502 comments - in scalar context returns them joined by newlines.
503
504 DeleteParameterComment ($section, $parmeter)
505 Deletes the comment attached to a parameter.
506
507 GetParameterEOT ($section, $parameter)
508 Accessor method for the EOT text (in fact, style) of the specified
509 parameter. If any text is used as an EOT mark, this will be returned.
510 If the parameter was not recorded using HERE style multiple lines,
511 GetParameterEOT returns undef.
512
513 $cfg->SetParameterEOT ($section, $parameter, $EOT)
514 Accessor method for the EOT text for the specified parameter. Sets the
515 HERE style marker text to the value $EOT. Once the EOT text is set,
516 that parameter will be saved in HERE style.
517
518 To un-set the EOT text, use DeleteParameterEOT ($section, $parameter).
519
520 DeleteParameterEOT ($section, $parmeter)
521 Removes the EOT marker for the given section and parameter. When
522 writing a configuration file, if no EOT marker is defined then "EOT" is
523 used.
524
525 SetParameterTrailingComment ($section, $parameter, $cmt)
526 Set the end trailing comment for the given section and parameter. If
527 there is a old comment for the parameter, it will be overwritten by the
528 new one.
529
530 If there is a new parameter trailing comment to be added, the value
531 should be added first.
532
533 GetParameterTrailingComment ($section, $parameter)
534 An accessor method to read the trailing comment after the parameter.
535 The trailing comment will be returned if there is one. A null string
536 will be returned if the parameter exists but no comment for it.
537 otherwise, undef will be returned.
538
539 Delete
540 Deletes the entire configuration file in memory.
541
543 tie %ini, 'Config::IniFiles', (-file=>$filename, [-option=>value ...] )
544 Using "tie", you can tie a hash to a Config::IniFiles object. This
545 creates a new object which you can access through your hash, so you use
546 this instead of the new method. This actually creates a hash of hashes
547 to access the values in the INI file. The options you provide through
548 "tie" are the same as given for the new method, above.
549
550 Here's an example:
551
552 use Config::IniFiles;
553
554 my %ini
555 tie %ini, 'Config::IniFiles', ( -file => "/path/configfile.ini" );
556
557 print "We have $ini{Section}{Parameter}." if $ini{Section}{Parameter};
558
559 Accessing and using the hash works just like accessing a regular hash
560 and many of the object methods are made available through the hash
561 interface.
562
563 For those methods that do not coincide with the hash paradigm, you can
564 use the Perl "tied" function to get at the underlying object tied to
565 the hash and call methods on that object. For example, to write the
566 hash out to a new ini file, you would do something like this:
567
568 tied( %ini )->WriteConfig( "/newpath/newconfig.ini" ) ||
569 die "Could not write settings to new file.";
570
571 $val = $ini{$section}{$parameter}
572 Returns the value of $parameter in $section.
573
574 Multiline values accessed through a hash will be returned as a list in
575 list context and a concatenated value in scalar context.
576
577 $ini{$section}{$parameter} = $value;
578 Sets the value of $parameter in $section to $value.
579
580 To set a multiline or multiv-alue parameter just assign an array
581 reference to the hash entry, like this:
582
583 $ini{$section}{$parameter} = [$value1, $value2, ...];
584
585 If the parameter did not exist in the original file, it will be
586 created. However, Perl does not seem to extend autovivification to tied
587 hashes. That means that if you try to say
588
589 $ini{new_section}{new_paramters} = $val;
590
591 and the section 'new_section' does not exist, then Perl won't properly
592 create it. In order to work around this you will need to create a hash
593 reference in that section and then assign the parameter value.
594 Something like this should do nicely:
595
596 $ini{new_section} = {};
597 $ini{new_section}{new_paramters} = $val;
598
599 %hash = %{$ini{$section}}
600 Using the tie interface, you can copy whole sections of the ini file
601 into another hash. Note that this makes a copy of the entire section.
602 The new hash in no longer tied to the ini file, In particular, this
603 means -default and -nocase settings will not apply to %hash.
604
605 $ini{$section} = {}; %{$ini{$section}} = %parameters;
606 Through the hash interface, you have the ability to replace the entire
607 section with a new set of parameters. This call will fail, however, if
608 the argument passed in NOT a hash reference. You must use both lines,
609 as shown above so that Perl recognizes the section as a hash reference
610 context before COPYing over the values from your %parameters hash.
611
612 delete $ini{$section}{$parameter}
613 When tied to a hash, you can use the Perl "delete" function to
614 completely remove a parameter from a section.
615
616 delete $ini{$section}
617 The tied interface also allows you to delete an entire section from the
618 ini file using the Perl "delete" function.
619
620 %ini = ();
621 If you really want to delete all the items in the ini file, this will
622 do it. Of course, the changes won't be written to the actual file
623 unless you call RewriteConfig on the object tied to the hash.
624
625 Parameter names
626 my @keys = keys %{$ini{$section}}
627 while (($k, $v) = each %{$ini{$section}}) {...}
628 if( exists %{$ini{$section}}, $parameter ) {...}
629
630 When tied to a hash, you use the Perl "keys" and "each" functions to
631 iteratively list the parameters ("keys") or parameters and their values
632 ("each") in a given section.
633
634 You can also use the Perl "exists" function to see if a parameter is
635 defined in a given section.
636
637 Note that none of these will return parameter names that are part of
638 the default section (if set), although accessing an unknown parameter
639 in the specified section will return a value from the default section
640 if there is one.
641
642 Section names
643 foreach( keys %ini ) {...}
644 while (($k, $v) = each %ini) {...}
645 if( exists %ini, $section ) {...}
646
647 When tied to a hash, you use the Perl "keys" and "each" functions to
648 iteratively list the sections in the ini file.
649
650 You can also use the Perl "exists" function to see if a section is
651 defined in the file.
652
654 The -import option to "new" allows one to stack one Config::IniFiles
655 object on top of another (which might be itself stacked in turn and so
656 on recursively, but this is beyond the point). The effect, as briefly
657 explained in "new", is that the fields appearing in the composite
658 object will be a superposition of those coming from the ``original''
659 one and the lines coming from the file, the latter taking precedence.
660 For example, let's say that $master and "overlay" were created like
661 this:
662
663 my $master = Config::IniFiles->new(-file => "master.ini");
664 my $overlay = Config::IniFiles->new(-file => "overlay.ini",
665 -import => $master);
666
667 If the contents of "master.ini" and "overlay.ini" are respectively
668
669 ; master.ini
670 [section1]
671 arg0=unchanged from master.ini
672 arg1=val1
673
674 [section2]
675 arg2=val2
676
677 and
678
679 ; overlay.ini
680 [section1]
681 arg1=overriden
682
683 Then "$overlay->val("section1", "arg1")" is "overriden", while
684 "$overlay->val("section1", "arg0")" is "unchanged from master.ini".
685
686 This feature may be used to ship a ``global defaults'' configuration
687 file for a Perl application, that can be overridden piecewise by a much
688 shorter, per-site configuration file. Assuming UNIX-style path names,
689 this would be done like this:
690
691 my $defaultconfig = Config::IniFiles->new
692 (-file => "/usr/share/myapp/myapp.ini.default");
693 my $config = Config::IniFiles->new
694 (-file => "/etc/myapp.ini", -import => $defaultconfig);
695 # Now use $config and forget about $defaultconfig in the rest of
696 # the program
697
698 Starting with version 2.39, Config::IniFiles also provides features to
699 keep the importing / per-site configuration file small, by only saving
700 those options that were modified by the running program. That is, if
701 one calls
702
703 $overlay->setval("section1", "arg1", "anotherval");
704 $overlay->newval("section3", "arg3", "val3");
705 $overlay->WriteConfig(-delta=>1);
706
707 "overlay.ini" would now contain
708
709 ; overlay.ini
710 [section1]
711 arg1=anotherval
712
713 [section3]
714 arg3=val3
715
716 This is called a delta file (see "WriteConfig"). The untouched
717 [section2] and arg0 do not appear, and the config file is therefore
718 shorter; while of course, reloading the configuration into $master and
719 $overlay, either through "$overlay->ReadConfig()" or through the same
720 code as above (e.g. when application restarts), would yield exactly the
721 same result had the overlay object been saved in whole to the file
722 system.
723
724 The only problem with this delta technique is one cannot delete the
725 default values in the overlay configuration file, only change them.
726 This is solved by a file format extension, enabled by the
727 -negativedeltas option to "new": if, say, one would delete parameters
728 like this,
729
730 $overlay->DeleteSection("section2");
731 $overlay->delval("section1", "arg0");
732 $overlay->WriteConfig(-delta=>1);
733
734 The overlay.ini file would now read:
735
736 ; overlay.ini
737 [section1]
738 ; arg0 is deleted
739 arg1=anotherval
740
741 ; [section2] is deleted
742
743 [section3]
744 arg3=val3
745
746 Assuming $overlay was later re-read with "-negativedeltas => 1", the
747 parser would interpret the deletion comments to yield the correct
748 result, that is, [section2] and arg0 would cease to exist in the
749 $overlay object.
750
752 @Config::IniFiles::errors
753 Contains a list of errors encountered while parsing the configuration
754 file. If the new method returns undef, check the value of this to find
755 out what's wrong. This value is reset each time a config file is read.
756
758 · The output from [Re]WriteConfig/OutputConfig might not be as pretty
759 as it can be. Comments are tied to whatever was immediately below
760 them. And case is not preserved for Section and Parameter names if
761 the -nocase option was used.
762
763 · No locking is done by [Re]WriteConfig. When writing servers, take
764 care that only the parent ever calls this, and consider making your
765 own backup.
766
768 Note that this is only a reference for the package maintainers - one of
769 the upcoming revisions to this package will include a total clean up of
770 the data structure.
771
772 $iniconf->{cf} = "config_file_name"
773 ->{startup_settings} = \%orginal_object_parameters
774 ->{firstload} = 0 OR 1
775 ->{imported} = $object WHERE $object->isa("Config::IniFiles")
776 ->{nocase} = 0
777 ->{reloadwarn} = 0
778 ->{sects} = \@sections
779 ->{mysects} = \@sections
780 ->{sCMT}{$sect} = \@comment_lines
781 ->{group}{$group} = \@group_members
782 ->{parms}{$sect} = \@section_parms
783 ->{myparms}{$sect} = \@section_parms
784 ->{EOT}{$sect}{$parm} = "end of text string"
785 ->{pCMT}{$sect}{$parm} = \@comment_lines
786 ->{v}{$sect}{$parm} = $value OR \@values
787
789 The original code was written by Scott Hutton. Then handled for a time
790 by Rich Bowen (thanks!), It is now managed by Jeremy Wadsack, with many
791 contributions from various other people.
792
793 In particular, special thanks go to (in roughly chronological order):
794
795 Bernie Cosell, Alan Young, Alex Satrapa, Mike Blazer, Wilbert van de
796 Pieterman, Steve Campbell, Robert Konigsberg, Scott Dellinger, R.
797 Bernstein, Daniel Winkelmann, Pires Claudio, Adrian Phillips, Marek
798 Rouchal, Luc St Louis, Adam Fischler, Kay Roepke, Matt Wilson, Raviraj
799 Murdeshwar and Slaven Rezic, Florian Pfaff
800
801 Geez, that's a lot of people. And apologies to the folks who were
802 missed.
803
804 If you want someone to bug about this, that would be:
805
806 Jeremy Wadsack <dgsupport at wadsack-allen dot com>
807
808 If you want more information, or want to participate, go to:
809
810 http://sourceforge.net/projects/config-inifiles/
811
812 Please send bug reports to config-inifiles-bugs@lists.sourceforge.net
813
814 Development discussion occurs on the mailing list
815 config-inifiles-dev@lists.sourceforge.net, which you can subscribe to
816 by going to the project web site (link above).
817
818 This program is free software; you can redistribute it and/or modify it
819 under the same terms as Perl itself.
820
821
822
823perl v5.12.3 2011-08-23 Config::IniFiles(3)