How to get Eclipse / EPIC to work with perlbrew

I am using Eclipse / EPIC for programming / debugging and perlbrew for switching between perl versions. For whatever reason, Eclipse / EPIC does not recognize perl version switching initiated by perlbrew. The version switch is permanent, but only affects the terminal session. I have already tried the method suggested in this forum ...

Go to Window-> Preferences-> Perl EPIC and set the Perl executable to

perl5/perlbrew/bin/perl

      

... but it didn't work. On typing, Eclipse / EPIC tries to run a command perl -v

which doesn't work. I am guessing this is because there is no perl command executable in that path. Path settings that actually need to be changed by perlbrew seem to have no effect. When specifying an absolute path instead ...

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

... Eclipse / EPIC is considering the requested version, but this is not really what I want. Is there any other correct way to get Eclipse / EPIC to work with perbrew? I'm running: MAC OS X -> Mountain Lion, Eclipse -> 4.2 JUNO, EPIC -> 0.5, perlbrew -> 0.58.

+3


source to share


2 answers


Try using the full path:

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

      



as suggested by the comment on your question.

0


source


The only workaround I've found is to use a shell for perl and set it as a perl interpreter. If your perlbrew init is by default, you can use the following bash shell:

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

      



put it somewhere, make it executable (chmod 0755) and set it as a perl interpreter in EPIC. This will run every time the EPIC accesses the perl interpreter, thus following if you switch from perlbrew. Hope it helps.

0


source







All Articles