4

I'm using Eclipse/EPIC for programming/debugging and perlbrew to switch between perl versions. For any reason Eclipse/EPIC doesn't recognize switching the perl versions initiated by perlbrew. Switching the version is persistent but does only effect the terminal session. I tried already the method that was suggested in this forum...

Click through to Window->Preferences->Perl EPIC and set the Perl executable to

perl5/perlbrew/bin/perl

... but that didn't work. When entered, Eclipse/EPIC tries to run the perl -v command, which fails. I assume that is because there is no executable perl command accessible in this path. The path settings that actually should be changed by perlbrew apparently don't have any effect. When pointing instead onto the absolute path...

perl5/perlbrew/perls/<version>/bin/perl

...Eclipse/EPIC considers the requested version, but that's actually not what I want. Is there any other proper way to make Eclipse/EPIC work with perbrew? I'm running: MAC OS X -> Mountain Lion, Eclipse -> 4.2 JUNO, EPIC -> 0.5, perlbrew -> 0.58 .

Thorsten
  • 41
  • 3
  • 1
    I would like to know the answer to this too. Essentially the question is "Does perlbrew maintain a statically named file system link to the current perl, where the link changes with `perlbrew switch`. (I can understand why this might not be possible if using `perlbrew use`.) – Stuart R. Jefferys Jul 31 '13 at 15:51
  • I just wasted another day with this myself (this=Perl libraries + Mac + Eclipse). Of course, no result. – Recct Oct 24 '14 at 15:52
  • Might sound silly, but did you try _full_ path? For me the following setting for perl executable works: `/Users//perl5/perlbrew/perls//bin/perl` – dudusan Nov 13 '14 at 19:31

2 Answers2

0

Try using the full path:

/Users/<user>/perl5/perlbrew/perls/<version>/bin/perl

as suggested by a comment on your question.

Spenser Truex
  • 159
  • 10
0

The only workaround I have found is to use a wrapper for perl and set it as perl interpreter. If Your perlbrew init is in the default path, you can use the following bash wrapper:

#!/bin/bash
ACTIVE_PERL=`grep -o 'PERLBREW_PATH=.*' $HOME/.perlbrew/init | sed -e 's/"\|:/\n/g' | awk '/perls\/perl/ { print $0."/perl" }'`
$ACTIVE_PERL "$@"

place it somewhere, make it executable ( chmod 0755 ) and set it as the perl interpreter in EPIC. That will be executed each time EPIC turns to the perl interpreter, thus following if You switch with perlbrew. Hope it helps.

salmonix
  • 13
  • 4