Perl语法检查:添加路径 [英] Perl Syntaxcheck: Add path
问题描述
我正在使用的某些perl模块不在我的$ PATH中的任何目录中,而是在另一个目录中.师父,我必须做
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 ....
但是由于我们在Apache中使用Perl-Modules,因此Apache确实包含了该目录.因此,我们不必每次都写use lib...
.
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不知道这一点,并将此类模块的所有use
标记为语法错误.
Syntastic does not know this, and marks all use
s of such modules as syntax-errors.
是否有任何方法可以告诉syntastic在进行语法检查时将另一个Directory添加到路径中,类似于perl -I
?
Is there any way to tell syntastic to add another Directory to the path when syntax-checking, similar to the perl -I
?
推荐答案
您需要将其添加到g:syntastic_perl_lib_path
:
let g:syntastic_perl_lib_path = ['/some/lib', '/some/other/lib' ]
这已记录在 Wiki 中.
这篇关于Perl语法检查:添加路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!