From 6b9a2a8e17648c0d6b612fbad66fe12e7d92cdc0 Mon Sep 17 00:00:00 2001 From: teastep Date: Sat, 31 Mar 2007 16:08:59 +0000 Subject: [PATCH] Correct comment; Fix silly bug in copy1() git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5769 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- New/Shorewall/Common.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/New/Shorewall/Common.pm b/New/Shorewall/Common.pm index d82a01be1..df9632c53 100644 --- a/New/Shorewall/Common.pm +++ b/New/Shorewall/Common.pm @@ -122,7 +122,7 @@ sub emit ( $ ) { } # -# Version of emit() that accepts an indefinite number of arguments; each argument will be emitted as a separate line +# Version of emit() that accepts an indefinite number of scalar arguments; each argument will be emitted as a separate line # sub emitj { if ( $object ) { @@ -131,7 +131,7 @@ sub emitj { # for ( @_ ) { unless ( /^\s*$/ ) { - my $line = $_; # This copy is necessary :-(. We modify the value below and we can't modify subroutine arguments. + my $line = $_; #This copy is necessary because the actual arguments are almost always read-only. $line =~ s/^\n// if $lastlineblank; $line =~ s/^/$indent/gm if $indent; $line =~ s/ /\t/g; @@ -239,7 +239,7 @@ sub copy1( $ ) { my $do_indent = 1; while ( ) { - if ( /^\s+$/ ) { + if ( /^\s*$/ ) { print $object "\n"; $do_indent = 1; next;