4

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?

David B
  • 29,258
  • 50
  • 133
  • 186

2 Answers2

1

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.

Gurunandan Bhat
  • 3,544
  • 3
  • 31
  • 43
  • There is no such symlink in os x installation, either 0.41 or 0.58. So I had to specify the perl I wanted. A slight pain, but not so bad. – rych Dec 07 '12 at 17:42
1

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.

Joel Berger
  • 20,180
  • 5
  • 49
  • 104