@INC PERL5LIB problem

donatis wrote on Mon Apr 30 16:41:59 MEST 2007:
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





   




jploski wrote on Mon Apr 30 21:45:39 MEST 2007:
What do you mean "project is too big"? What problems do you encounter exactly
when setting up a project?
jploski wrote on Mon Apr 30 21:53:40 MEST 2007:
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?
donatis wrote on Tue May  1 12:00:42 MEST 2007:
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 :))



jploski wrote on Tue May  1 13:13:10 MEST 2007:
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
donatis wrote on Tue May  1 14:58:34 MEST 2007:
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
jploski wrote on Tue May  1 15:34:07 MEST 2007:
> 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.
jploski wrote on Tue May  1 15:41:23 MEST 2007:
Ignore this comment, I overlooked c:/lib being present in the command-line
run of the script.
jploski wrote on Tue May  1 15:44:41 MEST 2007:
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.)
donatis wrote on Tue May  1 16:04:34 MEST 2007:
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


 
jploski wrote on Tue May  1 16:39:12 MEST 2007:
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
donatis wrote on Tue May  1 16:08:47 MEST 2007:
And i have allready bought a couple of OS cd`s not f*** my mind with windows

Note: The above is an archived snapshot of a forum thread. Use the original thread at sf.net to post comments.