How can I get Eclipse to work with `perlbrew`?

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

It seems that Eclipse does not recognize switches between perl versions and continues to work with the basic version installed from perlbrew . I tried restarting Eclipse, but that did not help.

So how can I get Eclipse to work with perlbrew ?

+4
source share
2 answers

If you use EPIC, this will work: go to Window-> Preferences-> Perl EPIC and set the Perl executable to perl5/perlbrew/bin/perl . This always indicates the currently installed version of perl. The path refers to your $ HOME on Linux.

+1
source

I have not tried this, since I usually use a text editor for Perl, but I took the line shebang #!/usr/bin/env perl to use to get perl for the user who runs the script (i.e. perlbrew, if me, perl system if root). If Eclipse runs the script ( ./myscript.pl) this should work, if instead it calls perl myscript.pl ", this will not help you.

+1
source

All Articles