aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-08-29 08:19:31 +0300
committerSergey Poznyakoff <gray@gnu.org>2019-08-29 08:22:18 +0300
commit719e57aabc1c65cb5b9feaf1733859f0e8d4931f (patch)
tree88166e86c5b9bc4c536536bb7783af6580961cda /lib
parentd69ba51bb8498146d07a08031de3685e6cda0768 (diff)
downloadconfig-parser-719e57aabc1c65cb5b9feaf1733859f0e8d4931f.tar.gz
config-parser-719e57aabc1c65cb5b9feaf1733859f0e8d4931f.tar.bz2
Update for Config::AST 1.05v1.04
* Changes: Update. * Makefile.PL: Require Config::AST 1.05 * lib/Config/Parser.pm: Use L<> for cross-references. * lib/Config/Parser/Ini.pm (_readconfig): Fix creation of section nodes. Remove access to the private class member
Diffstat (limited to 'lib')
-rw-r--r--lib/Config/Parser.pm12
-rw-r--r--lib/Config/Parser/Ini.pm13
2 files changed, 12 insertions, 13 deletions
diff --git a/lib/Config/Parser.pm b/lib/Config/Parser.pm
index bd230b5..ee39c2e 100644
--- a/lib/Config/Parser.pm
+++ b/lib/Config/Parser.pm
@@ -7,7 +7,7 @@ use Cwd qw(abs_path);
use Text::ParseWords;
use mro;
-our $VERSION = "1.03";
+our $VERSION = "1.04";
sub new {
my $class = shift;
@@ -177,7 +177,7 @@ Config::Parser - base class for configuration file parsers
B<Config::Parser> provides a framework for writing configuration file
parsers. It is an intermediate layer between the abstract syntax tree
-(B<Config::AST>) and implementation of a parser for a particular
+(L<Config::AST>) and implementation of a parser for a particular
configuration file format.
It takes a I<define by example> approach. That means that the implementer
@@ -280,7 +280,7 @@ Valid only together with B<filename>.
Dictionary of allowed configuration statements in the file. You will not
need this parameter. It is listed here for completeness sake. Refer to
-the B<Config::AST> constructor for details.
+the L<Config::AST> constructor for details.
=back
@@ -302,7 +302,7 @@ source tree.
=head1 PARSER METHODS
-The following two methods are derived from B<Config::AST>. They are
+The following two methods are derived from L<Config::AST>. They are
called internally by the constructor, if the file name is supplied.
=head2 $cfg->parse($filename, %opts)
@@ -373,7 +373,7 @@ If the data type is omitted, no checking is performed unless specified
otherwise by other options (see the B<:re> and B<:check> options below).
Options are special names prefixed with a colon. Option names follow
-the keywords from the B<Config::AST> keyword lexicon value. An option
+the keywords from the L<Config::AST> keyword lexicon value. An option
can be followed by an equals sign and its value. If an option is used
without arguments, the value B<1> is implied.
@@ -454,7 +454,7 @@ returns 0.
=head1 SEE ALSO
-B<Config::AST>(3).
+L<Config::AST>(3).
=cut
diff --git a/lib/Config/Parser/Ini.pm b/lib/Config/Parser/Ini.pm
index 67eaf1f..29923cf 100644
--- a/lib/Config/Parser/Ini.pm
+++ b/lib/Config/Parser/Ini.pm
@@ -62,11 +62,10 @@ sub _readconfig {
} else {
$include = 0;
$self->add_node(\@path,
- new Config::AST::Node::Section(locus => $locus));
+ new Config::AST::Node::Section($self, locus => $locus));
}
} elsif (/([\w_-]+)\s*=\s*(.*)/) {
my ($k, $v) = ($1, $2);
- $k = lc($k) if $self->{_ci}; #FIXME:private member
if ($include) {
if ($k eq 'path') {
@@ -148,7 +147,7 @@ fragment:
On success, this returns a valid B<Config::Parser::Ini> object. On error,
the diagnostic message is issued using the B<error> method (see the description
-of the method in B<Config::AST>(3)) and the module croaks.
+of the method in L<Config::AST>(3)) and the module croaks.
This usage, although simple, has one major drawback - no checking is performed
on the input file, except for the syntax check. To fix this, you can supply
@@ -200,7 +199,7 @@ additional validation for the configuration statements using the
B<:check> option. The argument to this option is the name of a
method which will be invoked after parsing the statement in order
to verify its value. It is described in detail below (see the section
-B<SYNTAX DEFINITION> in the documentation of B<Config::Parser>).
+B<SYNTAX DEFINITION> in the documentation of L<Config::Parser>).
For example, if you wish to ensure that the value of the C<root> setting
in C<core> section points to an existing directory, you would do:
@@ -255,17 +254,17 @@ created by using B<open> on the supplied filename.
Dictionary of allowed configuration statements in the file. You will not
need this parameter. It is listed here for completeness sake. Refer to
-the B<Config::AST> constructor for details.
+the L<Config::AST> constructor for details.
=back
=head1 METHODS
-All methods are inherited from B<Config::Parser>. Please see its
+All methods are inherited from L<Config::Parser>. Please see its
documentation for details.
=head1 SEE ALSO
-B<Config::Parser>(3), B<Config::AST>(3).
+L<Config::Parser>(3), L<Config::AST>(3).
=cut

Return to:

Send suggestions and report system problems to the System administrator.