There is no special way to set environment variables for Eclipse.
Based on your first post, you set the environment variable using the command line. Maybe this is the problem. You should set it using the "My Computer" dialog. See http://support.microsoft.com/kb/310519
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Another tip: to see how EPIC is invoking Perl exactly, you can "Enable debugger console" in preferences and launch your script in debug mode then. The view "Error Log" will then contain the full command-line used by EPIC as well as the environment variables passed to the Perl interpreter. With this information, you can try reproducing the exact same behavior in command-line and perhaps discover what matters.
You can probably open the "Error Log" using Window/Show View - if not, you can find the log in file workspace/.metadata/.log
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi. (bad english sorry)
System:
xp
activestate 5.8.8
Eclipse SDK Version: 3.2.2
Epic 0.5.3.5
cmd > set PERL5LIB="Z:/lib"
cmd > perl -e "foreach (@INC){print $_. ':::'}"
Z:/lib:::C:/Perl/site/lib:::C:/Perl/lib:::.:::
So here is Z:/lib.
Next i restart my pc(to be sure), and Z:/lib is still here.
Next i launch(turn on) eclipse and write something like this
#!......
use SOMETHING_THAT_IS_NOT_IN_PERL_LIB_OR_PERL_SITE_LIB
here comes error message
Can't locate SOMETHING_THA......pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib)
Thats wrong there is my Z:/lib????
I can not use project properties because project i am working on is to big to become 1 in eclipse even with eclipse jvm args
-vmargs
-Xms500m
-Xmx1000m
and even if i set path to libs in eclips i am getting that epic links cannot find some of them selfs
sorry for my bad language :( can you help me
What do you mean "project is too big"? What problems do you encounter exactly when setting up a project?
Another question: are you sure that the PERL5LIB environment variable is visible in Eclipse at all? Did you try running a script with
print $ENV{'PERL5LIB'}
on the command-line and from Eclipse?
You are wright
eclipse does not see it :Use of uninitialized value in print at
cmd work fine :Z\:lib
Is there a place in eclipse where i can set such thing or i can only add libs to project -> perl include path.
Or is where a way to make EPIC LINKS not to complain about execution errors, because i can not set for them perl include path?
Thanks.
PS: to big is 5 to 7 times rewritten hosting(good one) billing, its like looking in black hole(space one :))
There is no special way to set environment variables for Eclipse.
Based on your first post, you set the environment variable using the command line. Maybe this is the problem. You should set it using the "My Computer" dialog. See http://support.microsoft.com/kb/310519
Yes i did so and now i even see $ENV{'PERL5LIB'} in eclipse with no result for @INC, strange.
To be sure: WHEN i set PERL5LIB THEN i expect to see it in @INC THATS RIGHT?
SOURCE:
#C:/Perl/bin/perl
use Data::Dumper;
print Dumper(\@INC);
print "\n";
print $ENV{'PERL5LIB'};
ECLIPSE RESULT:
$VAR1 = [
'C:/Documents and Settings/dmitry/workspace/.metadata/.plugins/org.epic.debug',
'C:/Documents and Settings/dmitry/workspace/test',
'C:/Perl/site/lib',
'C:/Perl/lib'
];
C:/lib
CMD RESULT:
$VAR1 = [
'C:/lib',
'C:/Perl/site/lib',
'C:/Perl/lib',
'.'
];
C:/lib
> WHEN i set PERL5LIB THEN i expect to see it in @INC THATS RIGHT?
Yes.
I think this is a problem with ActiveState Perl, not with EPIC. Maybe you should also try PERLLIB instead of PERL5LIB.
Ignore this comment, I overlooked c:/lib being present in the command-line run of the script.
Make a little test: run the command-line version of your script with a -I parameter, for example:
perl -I "C:/Documents and Settings/dmitry/workspace/test" -I "C:/Documents and Settings/dmitry/workspace/.metadata/.plugins/org.epic.debug" script.pl
This is how EPIC executes it. It should NOT remove the c:/lib entry which comes from PERL5LIB. (It does not under Linux.)
I was thnking about that too and entered PERL5LIB many dirs
SOURCE:
print Dumper(\@INC);
print "\n";
print $ENV{'PERL5LIB'};
CMD OUTPUT:
C:\>perl -I "C:/fake/lib" -I "C:/fake2/lib" perl.pl
$VAR1 = [
'C:/fake/lib',
'C:/fake2/lib',
'C:/lib',
'C:/lib1',
'C:/lib2',
'C:/Perl/site/lib',
'C:/Perl/lib',
'.'
];
C:/lib;C:/lib1;C:/lib2
and PERLLIB did not help too
Thanks for trying
I`ve got some other thing to try setting
installvendorarch
installvendorlib
in Activestates/bin/config.pm
If the result for that will be sucsesfull i will make a note here
Another tip: to see how EPIC is invoking Perl exactly, you can "Enable debugger console" in preferences and launch your script in debug mode then. The view "Error Log" will then contain the full command-line used by EPIC as well as the environment variables passed to the Perl interpreter. With this information, you can try reproducing the exact same behavior in command-line and perhaps discover what matters.
You can probably open the "Error Log" using Window/Show View - if not, you can find the log in file workspace/.metadata/.log
And i have allready bought a couple of OS cd`s not f*** my mind with windows