Perl Syntaxcheck: Add path

2019-09-19 04:03发布

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?

标签: vim syntastic
1条回答
爷、活的狠高调
2楼-- · 2019-09-19 04:12

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.

查看更多
登录 后发表回答