[libconfig-tiny-perl] 15/21: Merge tag 'upstream/2.20'
Damyan Ivanov
dmn at moszumanska.debian.org
Sat Jun 20 11:30:32 UTC 2015
This is an automated email from the git hooks/post-receive script.
dmn pushed a commit to branch master
in repository libconfig-tiny-perl.
commit b32d2d7b00dd4b1b6a22c1dd8d681a6da00e9c36
Merge: 823f85b 2278416
Author: Dominic Hargreaves <dom at earth.li>
Date: Sun Feb 2 23:31:17 2014 +0000
Merge tag 'upstream/2.20'
Upstream version 2.20
Conflicts:
Changes
MANIFEST
META.yml
Makefile.PL
lib/Config/Tiny.pm
t/02_main.t
Build.PL | 30 +++++
Changelog.ini | 244 +++++++++++++++++++++++++++++++++++++++
Changes | 86 ++++++++++----
MANIFEST | 12 +-
META.json | 51 ++++++++
META.yml | 45 ++++----
Makefile.PL | 27 +++--
lib/Config/Tiny.pm | 235 +++++++++++++++++++++++++++----------
t/{01_compile.t => 01.compile.t} | 0
t/{02_main.t => 02.main.t} | 67 ++++++-----
t/03.read.string.t | 17 +++
t/04.utf8.t | 39 +++++++
t/04.utf8.txt | 4 +
13 files changed, 703 insertions(+), 154 deletions(-)
diff --cc lib/Config/Tiny.pm
index 2496129,ed25ff2..55c2b96
mode 100755,100644..100644
--- a/lib/Config/Tiny.pm
+++ b/lib/Config/Tiny.pm
@@@ -229,22 -272,75 +272,86 @@@ See t/04.utf8.t and t/04.utf8.txt
Generates the file content for the object and returns it as a string.
- =head2 errstr
+ =head1 FAQ
+
+ =head2 Why can't I put comments at the ends of lines?
+
+ Because a line like:
+
+ key=value # A comment
+
+ Sets key to 'value # A comment' :-(.
- When an error occurs, you can retrieve the error message either from the
- C<$Config::Tiny::errstr> variable, or using the C<errstr()> method.
+ This conforms to the syntax discussed in L</CONFIGURATION FILE SYNTAX>.
+
+ =head2 Why can't I omit the '=' signs?
+
+ E.g.:
+
+ [Things]
+ my =
+ list =
+ of =
+ things =
+
+ Instead of:
+
+ [Things]
+ my
+ list
+ of
+ things
+
+ Because the use of '=' signs is a type of mandatory documentation. It indicates that that section contains 4 items,
+ and not 1 odd item split over 4 lines.
+
+ =head2 Why do I have to assign the result of a method call to a variable?
+
+ This question comes from RT#85386.
+
+ Yes, the syntax may seem odd, but you don't have to call both new() and read_string().
+
+ Try:
+
+ perl -MData::Dumper -MConfig::Tiny -E 'my $c=Config::Tiny->read_string("one=s"); say Dumper $c'
+
+ Or:
+
+ my($config) = Config::Tiny -> read_string('alpha=bet');
+ my($value) = $$config{_}{alpha}; # $value is 'bet'.
+
+ Or even, a bit ridiculously:
+
+ my($value) = ${Config::Tiny -> read_string('alpha=bet')}{_}{alpha}; # $value is 'bet'.
+
+ =head1 CAVEATS
+
+ =head2 Unsupported Section Headers
+
+ Some edge cases in section headers are not supported, and additionally may not
+ be detected when writing the config file.
+
+ Specifically, section headers with leading whitespace, trailing whitespace,
+ or newlines anywhere in the section header, will not be written correctly
+ to the file and may cause file corruption.
+
+ =head2 Setting an option more than once
+
+ C<Config::Tiny> will only recognize the first time an option is set in a
+ config file. Any further attempts to set the same option later in the config
+ file are ignored.
+=head1 CAVEATS
+
+=head2 Unsupported Section Headers
+
+Some edge cases in section headers are not support, and additionally may not
+be detected when writing the config file.
+
+Specifically, section headers with leading whitespace, trailing whitespace,
+or newlines anywhere in the section header, will not be written correctly
+to the file and may cause file corruption.
+
=head1 SUPPORT
Bugs should be reported via the CPAN bug tracker at
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-tiny-perl.git
More information about the Pkg-perl-cvs-commits
mailing list