From 307537336f2ab02d422c8b269a48dd2c8cee9d71 Mon Sep 17 00:00:00 2001 From: teastep Date: Sun, 1 Apr 2007 00:10:17 +0000 Subject: [PATCH] Combine some line-level edits git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5781 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- New/Shorewall/Config.pm | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/New/Shorewall/Config.pm b/New/Shorewall/Config.pm index 35b482404..b3770e95d 100644 --- a/New/Shorewall/Config.pm +++ b/New/Shorewall/Config.pm @@ -393,6 +393,7 @@ sub read_a_line { $line .= $nextline; + $line =~ s/#.*$//; # Remove Trailing Comments # # Ignore ( concatenated ) Blank Lines # @@ -400,15 +401,7 @@ sub read_a_line { $line = ''; next; } - # - # Ignore ( concatenated ) lines that are nothing but comments - # - if ( $line =~ /^\s*#/ ) { - $line = ''; - next; - } - - $line =~ s/#.*$//; # Remove Trailing Comments + $line =~ s/^\s+//; # Remove Leading white space $line =~ s/\s+$//; # Remove Trailing white space #