diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index e521e91a5..d8b4b38b8 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -1574,8 +1574,6 @@ sub copy( $ ) { my $file = $_[0]; my $save_ifstack = $ifstack; - $ifstack = @ifstack; - open IF , $file or fatal_error "Unable to open $file: $!"; while ( ) { @@ -1603,7 +1601,7 @@ sub copy( $ ) { } } - unless( $ifstack == @ifstack ) { + unless( $save_ifstack == @ifstack ) { my $lastref = $ifstack[-1]; $currentlinenumber = 'EOF'; $currentfilename = $file; @@ -1627,9 +1625,6 @@ sub copy1( $ ) { if ( $script || $debug ) { my ( $do_indent, $here_documents ) = ( 1, ''); my $save_ifstack = $ifstack; - - $ifstack = @ifstack; - open_file( $_[0] ); while ( $currentfile ) { @@ -1727,7 +1722,7 @@ sub copy1( $ ) { } } - unless( $ifstack == @ifstack ) { + unless( $save_ifstack == @ifstack ) { my $lastref = $ifstack[-1]; $currentlinenumber = 'EOF'; $currentfilename = $_[0]; @@ -1766,8 +1761,6 @@ sub copy2( $$ ) { unless ( $empty ) { my $save_ifstack = $ifstack; - $ifstack = @ifstack; - emit <