Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使Eclipse与“perlbrew”一起工作?_Eclipse_Perl_Perlbrew - Fatal编程技术网

如何使Eclipse与“perlbrew”一起工作?

如何使Eclipse与“perlbrew”一起工作?,eclipse,perl,perlbrew,Eclipse,Perl,Perlbrew,我正在使用perlbrew在perl版本之间切换。我还使用Eclipse编写perl脚本 Eclipse似乎无法识别perl版本之间的切换,并继续使用安装在perlbrew之外的基本版本。我尝试重新启动Eclipse,但这没有帮助 那么,我如何使Eclipse与perlbrew一起工作呢?如果您使用的是EPIC,这将起作用:单击窗口->首选项->Perl EPIC并将Perl可执行文件设置为perl5/perlbrew/bin/Perl。这始终指向perl的当前set版本。路径与Linux上的$

我正在使用
perlbrew
在perl版本之间切换。我还使用Eclipse编写perl脚本

Eclipse似乎无法识别perl版本之间的切换,并继续使用安装在
perlbrew
之外的基本版本。我尝试重新启动Eclipse,但这没有帮助


那么,我如何使Eclipse与
perlbrew
一起工作呢?

如果您使用的是EPIC,这将起作用:单击窗口->首选项->Perl EPIC并将Perl可执行文件设置为
perl5/perlbrew/bin/Perl
。这始终指向perl的当前set版本。路径与Linux上的$HOME相对。

我没有尝试过,因为我通常只使用Perl文本编辑器,但我已经习惯使用shebang行
#/usr/bin/env perl
,以便为运行脚本的用户获取
perl
(即perlbrew if me,system perl if root)。如果Eclipse执行脚本(
/myscript.pl),这应该可以工作,如果它调用
perl myscript.pl`则这对您没有帮助。

OSX安装中没有这样的符号链接,无论是0.41还是0.58。所以我必须指定我想要的perl。轻微的疼痛,但不是很严重。