summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorNiko Tyni <ntyni@iki.fi>2005-02-22 12:36:49 +0100
committerNiko Tyni <ntyni@iki.fi>2005-02-22 12:36:49 +0100
commita8f89dab926914ba921b09adc6eaf2e92f9e0512 (patch)
tree3132a2c339bc04af5a3afb32e63cad54a597d462 /lib
parentd0f8c7c435da69415c4a391c80f1b39706c2d86d (diff)
downloadsmokeping-a8f89dab926914ba921b09adc6eaf2e92f9e0512.tar.gz
smokeping-a8f89dab926914ba921b09adc6eaf2e92f9e0512.tar.xz
ISG::ParseConfig bugfixes.
Diffstat (limited to 'lib')
-rw-r--r--lib/ISG/ParseConfig.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ISG/ParseConfig.pm b/lib/ISG/ParseConfig.pm
index e578bf8..9afdb11 100644
--- a/lib/ISG/ParseConfig.pm
+++ b/lib/ISG/ParseConfig.pm
@@ -599,15 +599,15 @@ sub _parse_line($$$)
/^\*\*\*\s*(.*?)\s*\*\*\*$/ and do {
my $name = $1;
- $self->_check_section_sub($name) or return 0;
$self->_goto_level(1, $name) or return 0;
+ $self->_check_section_sub($name) or return 0;
return 1;
};
/^(\++)\s*(.*)$/ and do {
my $level = length $1;
my $name = $2;
- $self->_check_section_sub($name) or return 0;
$self->_goto_level($level + 1, $name) or return 0;
+ $self->_check_section_sub($name) or return 0;
return 1;
};
@@ -792,8 +792,8 @@ sub _describevar {
my @doc;
push @doc, "=item B<$var>".$mandatory;
push @doc, $tree->{$var}{_doc} if $tree->{$var}{_doc} ;
- my $inherited = $tree->{_inherited} and
- grep {$_ eq $var} @{$tree->{_inherited}};
+ my $inherited = ( $tree->{_inherited} and
+ grep {$_ eq $var} @{$tree->{_inherited}});
push @doc, "This variable I<inherits> its value from the parent section if nothing is specified here."
if $inherited;
push @doc, "This variable I<dynamically> modifies the grammar based on its value."