mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-15 10:51:02 +01:00
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:
parent
c8cf4f6685
commit
438d3aec0b
@ -866,8 +866,10 @@ sub read_a_line() {
|
||||
# Continuation
|
||||
#
|
||||
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
|
||||
#
|
||||
@ -875,11 +877,11 @@ sub read_a_line() {
|
||||
#
|
||||
# Expand Shell Variables using %ENV
|
||||
#
|
||||
while ( $currentline =~ m( ^(.*?)
|
||||
\$({)?
|
||||
([a-zA-Z]\w*)
|
||||
(?(2)})
|
||||
(.*)$)x
|
||||
while ( $currentline =~ m( ^(.*?) #Part preceding '$'
|
||||
\$({)? #'$' and optional '{'
|
||||
([a-zA-Z]\w*) #Shell Variable Name
|
||||
(?(2)}) #Match closing '}'
|
||||
(.*)$)x #Rest of Line
|
||||
) {
|
||||
my $val = $ENV{$3};
|
||||
$val = '' unless defined $val;
|
||||
|
Loading…
Reference in New Issue
Block a user