scrooloose/syntastic — pull request #269 by eharmon (2012-05-31 08:36:43+00:00)
Title: Add support for warnings in Perl

The current syntax checker for Perl lists all warnings, syntax warnings, and errors as errors, which can be fairly annoying. Unfortunately this is a symptom of Perl's error system itself, it simply doesn't differentiate between errors and warnings.

This change modifies the intermediary Perl script error formatter to support warnings and errors separately, avoiding the aforementioned issue by executing Perl twice. First we execute a syntax check and compile with warnings forced off (in case the user has specified 'use warnings' in their script), to collect errors. Then we execute a syntax check only with warnings turned on. With these two lists of errors we can see which errors are new when we run the warning check, and thus which errors must actually be warnings. We can then pass this back to Vim accordingly, with a very minimal performance hit.

I actually want to convert this entire checker to VimL if I have the time since the intermediary doesn't seem required, but this makes the Perl checker much more helpful for now.