Replace BEGIN blocks with INIT blocks

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5782 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-04-01 14:07:06 +00:00
parent 307537336f
commit 2ad9daae7e
3 changed files with 7 additions and 7 deletions

View File

@ -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} || '';
}

View File

@ -226,7 +226,7 @@ my $currentfilename;
my $currentlinenumber = 0;
my $tmp_dir;
BEGIN {
INIT {
$tmp_dir = $ENV{TMP_DIR};
}
@ -393,7 +393,7 @@ sub read_a_line {
$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 ];

View File

@ -62,7 +62,7 @@ use Shorewall::Proxyarp;
my $export;
BEGIN {
INIT {
$export = $ENV{EXPORT};
}