Lines 249-254
Link Here
|
249 |
while (defined ($line = shift @conf_lines)) { |
249 |
while (defined ($line = shift @conf_lines)) { |
250 |
local ($1); # bug 3838: prevent random taint flagging of $1 |
250 |
local ($1); # bug 3838: prevent random taint flagging of $1 |
251 |
|
251 |
|
|
|
252 |
# Line continuation via having a '\' at the end of a line; leading |
253 |
# whitespace of continuing line is ignored. Empty lines are |
254 |
# discarded, with the first non-empty line following the continued |
255 |
# line being used to continue it, but comments are not discarded. |
256 |
while ($line =~ /\\$/) { |
257 |
my $cont; |
258 |
unless (defined ($cont = shift @conf_lines)) { |
259 |
die "config: line '$line' in file $self->{currentfile} ends in \\, " . |
260 |
"but is last element in \@conf_lines"; |
261 |
} |
262 |
|
263 |
next if ($cont =~ /^\s*$/); |
264 |
$line =~ s/\\$//; |
265 |
|
266 |
if ($cont =~ /^file start /) { |
267 |
$cont =~ s/^file start //; |
268 |
die "config: line '$line' in file $self->{currentfile} ends in \\ " . |
269 |
"and continues into the start of file $cont; impossible."; |
270 |
} |
271 |
elsif ($cont =~ /^file end /) { |
272 |
warn "config: line '$line' in file $self->{currentfile} ends in \\, " . |
273 |
"but is last line in the file"; |
274 |
unshift(@conf_lines, $cont); |
275 |
unshift(@conf_lines, ""); |
276 |
last; |
277 |
} |
278 |
$cont =~ s/^\s*//g; |
279 |
$line .= $cont; |
280 |
} |
281 |
|
252 |
# bug 5545: used to support testing rules in the ruleqa system |
282 |
# bug 5545: used to support testing rules in the ruleqa system |
253 |
if ($keepmetadata && $line =~ /^\#testrules/) { |
283 |
if ($keepmetadata && $line =~ /^\#testrules/) { |
254 |
$self->{file_scoped_attrs}->{testrules}++; |
284 |
$self->{file_scoped_attrs}->{testrules}++; |