From 2545322163259d2a2ee9b1f33e01a109d3406636 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 9 Apr 2012 16:00:26 -0700 Subject: [PATCH] Cleanup of read_a_line() Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index e6f531852..e385792c6 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -2182,18 +2182,14 @@ sub read_a_line(;$$$$) { # s/^\s*// if $currentline =~ /[,:]$/ && $suppress_whitespace; # - # If this isn't a continued line, remove trailing comments. Note that - # the result may now end in '\'. + # If this is a continued line with a trailing comment, remove comment. Note that + # the result will now end in '\'. # s/\s*#.*$// if $strip_comments && /[\\]\s*#.*$/; # # Continuation # - chop $currentline, next if substr( ( $currentline .= $_ ), -1, 1 ) eq '\\'; - # - # Ignore ( concatenated ) Blank Lines - # - $currentline = '', $currentlinenumber = 0, next if $currentline =~ /^\s*$/ && $suppress_whitespace; + chop $currentline, next if ($currentline .= $_) =~ /\\$/; # # Handle conditionals # @@ -2237,8 +2233,6 @@ sub read_a_line(;$$$$) { # Line not blank -- Handle any first-entry message/capabilities check # handle_first_entry if $first_entry; - - my $count = 0; # # Expand Shell Variables using %params and @actparms #