mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-24 11:41:26 +02:00
Tiny optimization
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6964 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
f6f1b38194
commit
32ba2ce0b9
@ -835,8 +835,6 @@ sub read_a_line() {
|
|||||||
|
|
||||||
while ( <$currentfile> ) {
|
while ( <$currentfile> ) {
|
||||||
|
|
||||||
$currentlinenumber++;
|
|
||||||
|
|
||||||
chomp;
|
chomp;
|
||||||
#
|
#
|
||||||
# Continuation
|
# Continuation
|
||||||
@ -850,11 +848,13 @@ sub read_a_line() {
|
|||||||
# Ignore ( concatenated ) Blank Lines
|
# Ignore ( concatenated ) Blank Lines
|
||||||
#
|
#
|
||||||
$currentline = '', next if $currentline =~ /^\s*$/;
|
$currentline = '', next if $currentline =~ /^\s*$/;
|
||||||
|
|
||||||
|
$currentlinenumber = $.;
|
||||||
#
|
#
|
||||||
# Expand Shell Variables using %ENV
|
# Expand Shell Variables using %ENV
|
||||||
#
|
#
|
||||||
# $1 $2 $3 - $4
|
# $1 $2 $3 - $4
|
||||||
while ( $currentline =~ m( ^(.*?) \$({)? ([a-zA-Z]\w*) (?(2)}) (.*)$)x ) {
|
while ( $currentline =~ m( ^(.*?) \$({)? ([a-zA-Z]\w*) (?(2)}) (.*)$ )x ) {
|
||||||
my $val = $ENV{$3};
|
my $val = $ENV{$3};
|
||||||
$val = '' unless defined $val;
|
$val = '' unless defined $val;
|
||||||
$currentline = join( '', $1 , $val , $4 );
|
$currentline = join( '', $1 , $val , $4 );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user