summaryrefslogtreecommitdiffstats
path: root/runtime/compiler/perl.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/compiler/perl.vim')
-rw-r--r--runtime/compiler/perl.vim14
1 files changed, 11 insertions, 3 deletions
diff --git a/runtime/compiler/perl.vim b/runtime/compiler/perl.vim
index 1d30472bbe..2b7c94a89a 100644
--- a/runtime/compiler/perl.vim
+++ b/runtime/compiler/perl.vim
@@ -1,7 +1,7 @@
" Vim Compiler File
" Compiler: Perl syntax checks (perl -Wc)
" Maintainer: Christian J. Robinson <infynity@onewest.net>
-" Last Change: 2004 Mar 27
+" Last Change: 2006 Aug 13
if exists("current_compiler")
finish
@@ -15,12 +15,20 @@ endif
let s:savecpo = &cpo
set cpo&vim
+if exists('g:perl_compiler_force_warnings') && g:perl_compiler_force_warnings == 0
+ let s:warnopt = 'w'
+else
+ let s:warnopt = 'W'
+endif
+
if getline(1) =~# '-[^ ]*T'
- CompilerSet makeprg=perl\ -WTc\ %
+ let s:taintopt = 'T'
else
- CompilerSet makeprg=perl\ -Wc\ %
+ let s:taintopt = ''
endif
+exe 'CompilerSet makeprg=perl\ -' . s:warnopt . s:taintopt . 'c\ %'
+
CompilerSet errorformat=
\%-G%.%#had\ compilation\ errors.,
\%-G%.%#syntax\ OK,