efm_perl: fix warning about uninitialized $opt_I

$ perl syntax_checkers/efm_perl.pl -c -w /dev/null
Use of uninitialized value $opt_I in split at syntax_checkers/efm_perl.pl line 94.
This commit is contained in:
Alex Efros 2012-12-19 17:10:58 +02:00
parent 5be9ee2111
commit 02a99d0e35

View File

@ -91,7 +91,7 @@ my $handle = (defined $opt_f ? \*FILE : \*STDOUT);
(my $file = shift) or &usage; # display usage if no filename is supplied
my $args = (@ARGV ? ' ' . join ' ', @ARGV : '');
my $libs = join ' ', map {"-I$_"} split ',', $opt_I;
my $libs = join ' ', map {"-I$_"} split ',', $opt_I || '';
my @error_lines = `perl $libs @{[defined $opt_c ? '-c ' : '' ]} @{[defined $opt_w ? '-X ' : '-Mwarnings ']} "$file$args" 2>&1`;
my @lines = map { "E:$_" } @error_lines;