Subject: | Update documentation for -DefaultConfig |
I spent some time confused by the behaviour of DefaultConfig. It was
only after debugging the code that I realised it was to be expected, and
it wasn't until reading bug report 49042 that I realised the correct
solution.
The attached patch modifies the documentation slightly to hopefully
explain to other people that this is expected behaviour.
Thanks,
Andy
Subject: | config-general-doc.patch |
This patch updates documentation to better explain how default values may
want to be created. See bug 49042.
diff -rupN Config-General-2.51/General.pm Config-General-andy//General.pm
--- Config-General-2.51/General.pm 2012-07-18 14:06:49.000000000 +0100
+++ Config-General-andy//General.pm 2012-09-12 22:20:59.563119918 +0100
@@ -1739,7 +1739,9 @@ would result in this hash structure:
This can be a hash reference or a simple scalar (string) of a config. This
causes the module to preset the resulting config hash with the given values,
which allows you to set default values for particular config options directly.
-
+Note that you probably want to use this with B<-MergeDuplicateOptions>, otherwise
+a default value already in the configuration file will produce an array of two
+values.
=item B<-Tie>