Perl Syntaxcheck: Add path

2019-09-19 03:29发布

问题:

Some perl modules i'm using are not in any directory in my $PATH, but in another. Normaler, I have to do

use lib '/path/to/modules';
use ModuleOne;

in order to use it. Or, if I do it on the terminal

perl -I/path/to/modules ....

But since we're using Perl-Modules in our Apache, the Apache does include the directory. So we do not have to write use lib... every time.

Syntastic does not know this, and marks all uses of such modules as syntax-errors.

Is there any way to tell syntastic to add another Directory to the path when syntax-checking, similar to the perl -I?

回答1:

You need to add it to g:syntastic_perl_lib_path:

let g:syntastic_perl_lib_path = ['/some/lib', '/some/other/lib' ]

This is documented in the wiki.



标签: vim syntastic