Perl Syntaxcheck: Add path

限于喜欢 提交于 2019-12-12 02:56:45

问题


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.



来源:https://stackoverflow.com/questions/30486762/perl-syntaxcheck-add-path

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!