问题
I have mounts of a remote source code repos in Linux
servers.
I use Eclipse Epic
and I have made links to the scripts there with the help of the answer of this post.
My problem is the following:
The project in the remote repository uses a specific version of Perl
which is under a specific directory.
How would I configure my project in Eclipse
to have/use exactly the same Perl
?
回答1:
I haven't tested this with an interpreter on a remote machine and I'm on Windows but I think this would work.
Go to
Window
->Preferences
->Perl EPIC
Click
...
next toPerl executable
and choose the location you want (this would be under your remote repository)Click
Apply
/OK
To check if it works, just do this:
use strict;
use warnings;
print "Version: $]\n";
print "Interpreter: $^X\n";
回答2:
I had the same question, because I have some Perl32 and Perl64 programs which I have to compile with different interpreters. And think, the main question was: "How can I use a particular perl interpreter for each project?"
EPICs preferences will change the interpreter for all projects, but not for a single one.
My solution was to create a small script as a wrapper for the perl interpreter. Then, in the properties of each project, I added a meaningless Perl Include Path, which serves only as a hint on the interpreter, because EPIC passes this Include Path as a parameter to perl. The wrapper script then looks for this hint and fires the right perl version.
来源:https://stackoverflow.com/questions/17760498/how-can-i-make-eclipse-perl-project-use-a-specific-perl-version