merge changes from upstream
[MacVim/jjgod.git] / runtime / compiler / perl.vim
blob1d30472bbe0026fc270ba38a9a0b6e24fb25a1cd
1 " Vim Compiler File
2 " Compiler:     Perl syntax checks (perl -Wc)
3 " Maintainer:   Christian J. Robinson <infynity@onewest.net>
4 " Last Change:  2004 Mar 27
6 if exists("current_compiler")
7   finish
8 endif
9 let current_compiler = "perl"
11 if exists(":CompilerSet") != 2          " older Vim always used :setlocal
12   command -nargs=* CompilerSet setlocal <args>
13 endif
15 let s:savecpo = &cpo
16 set cpo&vim
18 if getline(1) =~# '-[^ ]*T'
19         CompilerSet makeprg=perl\ -WTc\ %
20 else
21         CompilerSet makeprg=perl\ -Wc\ %
22 endif
24 CompilerSet errorformat=
25         \%-G%.%#had\ compilation\ errors.,
26         \%-G%.%#syntax\ OK,
27         \%m\ at\ %f\ line\ %l.,
28         \%+A%.%#\ at\ %f\ line\ %l\\,%.%#,
29         \%+C%.%#
31 " Explanation:
32 " %-G%.%#had\ compilation\ errors.,  - Ignore the obvious.
33 " %-G%.%#syntax\ OK,                 - Don't include the 'a-okay' message.
34 " %m\ at\ %f\ line\ %l.,             - Most errors...
35 " %+A%.%#\ at\ %f\ line\ %l\\,%.%#,  - As above, including ', near ...'
36 " %+C%.%#                            -   ... Which can be multi-line.
38 let &cpo = s:savecpo
39 unlet s:savecpo