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

发布于 2024-09-19 11:28:33 字数 210 浏览 2 评论 0原文

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

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

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

I'm using perlbrew to switch between perl versions. I also use Eclipse to write perl scripts.

It seems that Eclipse does not recognize the switches between perl versions, and keeps working with the base version installed out of perlbrew. I tried restarting Eclipse but this doen't help.

So, How can I make Eclipse work with perlbrew?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

度的依靠╰つ 2024-09-26 11:28:33

如果您使用的是 EPIC,则可以这样做:单击“Window”->“Preferences”->“Perl EPIC”并将 Perl 可执行文件设置为 perl5/perlbrew/bin/perl。这始终指向 perl 的当前设置版本。该路径是相对于 Linux 上的 $HOME 的。

If you are using EPIC, this will work: Click through to Window->Preferences->Perl EPIC and set the Perl executable to perl5/perlbrew/bin/perl. This always points to the current set version of perl. The path is relative to your $HOME on Linux.

寻找一个思念的角度 2024-09-26 11:28:33

我没有尝试过这个,因为我通常只使用 Perl 的文本编辑器,但我已经开始使用 shebang 行 #!/usr/bin/env perl 这样我就得到了 perl 用于运行脚本的用户(即,如果是我,则为 perlbrew;如果为 root,则为 system perl)。如果 Eclipse 执行脚本 (./myscript.pl),这应该可以工作,如果它调用perl myscript.pl`,那么这对您没有帮助。

I haven't tried this as I usually just use a text editor for Perl, but I have taken to using the shebang line #!/usr/bin/env perl so that I get the perl for the user that runs the script (ie. perlbrew if me, system perl if root). If Eclipse executes the script (./myscript.pl) this should work, if instead it callsperl myscript.pl` then this will not help you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文