开发者

How can I make Eclipse work with `perlbrew`?

开发者 https://www.devze.com 2023-01-16 20:17 出处:网络
I\'m using perlbrew to switch between perl versions. I also use Eclipse to write pe开发者_开发问答rl scripts.

I'm using perlbrew to switch between perl versions. I also use Eclipse to write pe开发者_开发问答rl 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?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号