diff --git a/New/Shorewall/Common.pm b/New/Shorewall/Common.pm index 7935bb2bb..813a09c89 100644 --- a/New/Shorewall/Common.pm +++ b/New/Shorewall/Common.pm @@ -84,7 +84,7 @@ my $indent = ''; my ( $dir, $file ); # Object's Directory and File my $tempfile; # Temporary File Name -BEGIN { +INIT { $verbose = $ENV{VERBOSE} || 0; $timestamp = $ENV{TIMESTAMP} || ''; } diff --git a/New/Shorewall/Config.pm b/New/Shorewall/Config.pm index b3770e95d..99b1b05c8 100644 --- a/New/Shorewall/Config.pm +++ b/New/Shorewall/Config.pm @@ -226,7 +226,7 @@ my $currentfilename; my $currentlinenumber = 0; my $tmp_dir; -BEGIN { +INIT { $tmp_dir = $ENV{TMP_DIR}; } @@ -387,13 +387,13 @@ sub read_a_line { # Continuation # if ( substr( $nextline, -1, 1 ) eq '\\' ) { - $line .= substr( $nextline, 0, -1 ); + $line .= substr( $nextline, 0, -1 ); next; } $line .= $nextline; - $line =~ s/#.*$//; # Remove Trailing Comments + $line =~ s/#.*$//; # Remove Trailing Comments -- result might be a blank line # # Ignore ( concatenated ) Blank Lines # @@ -410,7 +410,7 @@ sub read_a_line { $line = join( '', $1 , ( $ENV{$2} || '' ) , $3 ) while $line =~ /^(.*?)\${([a-zA-Z]\w*)}(.*)$/; $line = join( '', $1 , ( $ENV{$2} || '' ) , $3 ) while $line =~ /^(.*?)\$([a-zA-Z]\w*)(.*)$/; - if ( $line =~ /^\s*INCLUDE\s/ ) { + if ( $line =~ /^INCLUDE\s/ ) { my @line = split /\s+/, $line; @@ -420,7 +420,7 @@ sub read_a_line { my $filename = find_file $line[1]; - fatal_error "INCLUDed file $filename not found" unless ( -f $filename ); + fatal_error "INCLUDE file $filename not found" unless ( -f $filename ); if ( -s _ ) { push @openstack, [ $currentfile, $currentfilename, $currentlinenumber ]; diff --git a/New/compiler.pl b/New/compiler.pl index d191a96ad..4c0eefcd8 100755 --- a/New/compiler.pl +++ b/New/compiler.pl @@ -62,7 +62,7 @@ use Shorewall::Proxyarp; my $export; -BEGIN { +INIT { $export = $ENV{EXPORT}; }