Merge pull request #247 from rhansen/parse_assignments
Simplify `parse_assignments`
This commit is contained in:
commit
b0b04aa278
1 changed files with 5 additions and 9 deletions
|
@ -1058,17 +1058,13 @@ sub parse_assignments {
|
|||
while (1) {
|
||||
(my $name, my $value, $rest) = parse_assignment($rest);
|
||||
$rest =~ s/^[,\s]+//;
|
||||
if (defined $name) {
|
||||
return ($rest, %variables) if !defined($name);
|
||||
if ($name eq 'fw-banlocal') {
|
||||
warning("'fw-banlocal' is deprecated and does nothing");
|
||||
next;
|
||||
}
|
||||
$variables{$name} = $value;
|
||||
} else {
|
||||
last;
|
||||
}
|
||||
}
|
||||
return ($rest, %variables);
|
||||
}
|
||||
sub parse_assignment {
|
||||
my ($rest) = @_;
|
||||
|
|
Loading…
Reference in a new issue