Update syntax_checkers/efm_perl.pl
Use warnings pragma instead of warnings flag.
This commit is contained in:
parent
6d5a604251
commit
558de5a58c
@ -1,9 +1,10 @@
|
||||
#!/usr/bin/perl -w
|
||||
#!/usr/bin/perl
|
||||
use warnings
|
||||
|
||||
# vimparse.pl - Reformats the error messages of the Perl interpreter for use
|
||||
# with the quickfix mode of Vim
|
||||
#
|
||||
# Copyright (©) 2001 by Jörg Ziefle <joerg.ziefle@gmx.de>
|
||||
# Copyright (<EFBFBD>) 2001 by J<>rg Ziefle <joerg.ziefle@gmx.de>
|
||||
# Copyright (c) 2012 Eric Harmon <http://eharmon.net>
|
||||
# You may use and distribute this software under the same terms as Perl itself.
|
||||
#
|
||||
@ -93,13 +94,13 @@ my $handle = (defined $opt_f ? \*FILE : \*STDOUT);
|
||||
my $args = (@ARGV ? ' ' . join ' ', @ARGV : '');
|
||||
|
||||
my $libs = join ' ', map {"-I$_"} split ',', $opt_I;
|
||||
my @error_lines = `perl $libs @{[defined $opt_c ? '-c ' : '' ]} @{[defined $opt_w ? '-X ' : '-w ']} "$file$args" 2>&1`;
|
||||
my @error_lines = `perl $libs @{[defined $opt_c ? '-c ' : '' ]} @{[defined $opt_w ? '-X ' : '-Mwarnings ']} "$file$args" 2>&1`;
|
||||
|
||||
my @lines = map { "E:$_" } @error_lines;
|
||||
|
||||
my @warn_lines;
|
||||
if(defined($opt_w)) {
|
||||
@warn_lines = `perl $libs @{[defined $opt_c ? '-c ' : '' ]} -w "$file$args" 2>&1`;
|
||||
@warn_lines = `perl $libs @{[defined $opt_c ? '-c ' : '' ]} -Mwarnings "$file$args" 2>&1`;
|
||||
}
|
||||
|
||||
# Any new errors must be warnings
|
||||
|
Loading…
x
Reference in New Issue
Block a user