Improve readability (and add comments)

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6929 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-07-21 20:40:34 +00:00
parent c8cf4f6685
commit 438d3aec0b

View File

@ -866,8 +866,10 @@ sub read_a_line() {
# Continuation # Continuation
# #
chop $currentline, next if substr( ( $currentline .= $_ ), -1, 1 ) eq '\\'; chop $currentline, next if substr( ( $currentline .= $_ ), -1, 1 ) eq '\\';
#
$currentline =~ s/#.*$//; # Remove Trailing Comments -- result might be a blank line # Remove Trailing Comments -- result might be a blank line
#
$currentline =~ s/#.*$//;
# #
# Ignore ( concatenated ) Blank Lines # Ignore ( concatenated ) Blank Lines
# #
@ -875,11 +877,11 @@ sub read_a_line() {
# #
# Expand Shell Variables using %ENV # Expand Shell Variables using %ENV
# #
while ( $currentline =~ m( ^(.*?) while ( $currentline =~ m( ^(.*?) #Part preceding '$'
\$({)? \$({)? #'$' and optional '{'
([a-zA-Z]\w*) ([a-zA-Z]\w*) #Shell Variable Name
(?(2)}) (?(2)}) #Match closing '}'
(.*)$)x (.*)$)x #Rest of Line
) { ) {
my $val = $ENV{$3}; my $val = $ENV{$3};
$val = '' unless defined $val; $val = '' unless defined $val;