forked from extern/shorewall_code
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:
parent
307537336f
commit
2ad9daae7e
@ -84,7 +84,7 @@ my $indent = '';
|
|||||||
my ( $dir, $file ); # Object's Directory and File
|
my ( $dir, $file ); # Object's Directory and File
|
||||||
my $tempfile; # Temporary File Name
|
my $tempfile; # Temporary File Name
|
||||||
|
|
||||||
BEGIN {
|
INIT {
|
||||||
$verbose = $ENV{VERBOSE} || 0;
|
$verbose = $ENV{VERBOSE} || 0;
|
||||||
$timestamp = $ENV{TIMESTAMP} || '';
|
$timestamp = $ENV{TIMESTAMP} || '';
|
||||||
}
|
}
|
||||||
|
@ -226,7 +226,7 @@ my $currentfilename;
|
|||||||
my $currentlinenumber = 0;
|
my $currentlinenumber = 0;
|
||||||
my $tmp_dir;
|
my $tmp_dir;
|
||||||
|
|
||||||
BEGIN {
|
INIT {
|
||||||
$tmp_dir = $ENV{TMP_DIR};
|
$tmp_dir = $ENV{TMP_DIR};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -393,7 +393,7 @@ sub read_a_line {
|
|||||||
|
|
||||||
$line .= $nextline;
|
$line .= $nextline;
|
||||||
|
|
||||||
$line =~ s/#.*$//; # Remove Trailing Comments
|
$line =~ s/#.*$//; # Remove Trailing Comments -- result might be a blank line
|
||||||
#
|
#
|
||||||
# Ignore ( concatenated ) Blank Lines
|
# 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*)}(.*)$/;
|
||||||
$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;
|
my @line = split /\s+/, $line;
|
||||||
|
|
||||||
@ -420,7 +420,7 @@ sub read_a_line {
|
|||||||
|
|
||||||
my $filename = find_file $line[1];
|
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 _ ) {
|
if ( -s _ ) {
|
||||||
push @openstack, [ $currentfile, $currentfilename, $currentlinenumber ];
|
push @openstack, [ $currentfile, $currentfilename, $currentlinenumber ];
|
||||||
|
@ -62,7 +62,7 @@ use Shorewall::Proxyarp;
|
|||||||
|
|
||||||
my $export;
|
my $export;
|
||||||
|
|
||||||
BEGIN {
|
INIT {
|
||||||
$export = $ENV{EXPORT};
|
$export = $ENV{EXPORT};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user