Shlomi Fish  committed bd9cc9c

Correct the WriteConfig() with -delta documentation.

Thanks to the Mageia Linux QA team for detecting it.

  • Participants
  • Parent commits 2318a2a
  • Branches default

Comments (0)

Files changed (2)

File config-inifiles/Changes

+* Correct the documentation regarding the syntax of calling ->WriteConfig(),
+which always accepts a mandatory filename and not just
+"->WriteConfig(-delta => 1)".
+    - Thanks to the Mageia Linux QA team at:
+        -
 Version 2.75    ( Fri May 25 15:25:29 IDT 2012 )

File config-inifiles/lib/Config/

 If set to 0 (the default if not importing), these comments are treated
 like ordinary ones.
-The L</WriteConfig|WriteConfig(-delta=>1)> form will output such
+The L</WriteConfig|WriteConfig($filename, -delta=>1)> form will output such
 comments to indicate deleted sections or parameters. This way,
 reloading a delta file using the same imported object produces the
 same results in memory again. See L<IMPORT / DELTA FEATURES> for more
     $self->{mysects} = []; # A pair of hashes to remember which params are loaded
     $self->{myparms} = {}; # or set using the API vs. imported - useful for
     $self->{peCMT}  = {};  # this will store trailing comments at the end of single-lined params
-    # import shadowing, see below, and WriteConfig(-delta=>1)
+    # import shadowing, see below, and WriteConfig($fn, -delta=>1)
     if( defined $self->{imported} ) {
         # Run up the import tree to the top, then reload coming
 =head2 WriteConfig ($filename [, %options])
 Writes out a new copy of the configuration file.  A temporary file
-(ending in '-new') is written out and then renamed to the specified
-filename.  Also see B<BUGS> below.
+is written out and then renamed to the specified filename.  Also see
+B<BUGS> below.
 If C<-delta> is set to a true value in %options, and this object was
 imported from another (see L</new>), only the differences between this
    $overlay->setval("section1", "arg1", "anotherval");
    $overlay->newval("section3", "arg3", "val3");
-   $overlay->WriteConfig(-delta=>1);
+   $overlay->WriteConfig('overlay.ini', -delta=>1);
 C<overlay.ini> would now contain
    $overlay->delval("section1", "arg0");
-   $overlay->WriteConfig(-delta=>1);
+   $overlay->WriteConfig('overlay.ini', -delta=>1);
 The I<overlay.ini> file would now read: