From 558de5a58cd551c490abf1bec801c2e131a98f66 Mon Sep 17 00:00:00 2001 From: notbugger Date: Mon, 3 Dec 2012 15:42:31 -0800 Subject: [PATCH] Update syntax_checkers/efm_perl.pl Use warnings pragma instead of warnings flag. --- syntax_checkers/efm_perl.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/syntax_checkers/efm_perl.pl b/syntax_checkers/efm_perl.pl index fe6b67d4..4b1c0857 100644 --- a/syntax_checkers/efm_perl.pl +++ b/syntax_checkers/efm_perl.pl @@ -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 +# Copyright (�) 2001 by J�rg Ziefle # Copyright (c) 2012 Eric Harmon # 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