Passing OS environment for editing perl files

ascheman wrote on Wed Jan 23 10:28:36 CET 2008:
I do have code fragments like the following:

  warn "Env XXX not set" unless defined ($ENV{XXX});

(It's from code I have to maintain, so there is no way to circumvent it
by changes to the code).

This leads to "error" marks in the EPIC perl editor, the Project Explorer
view, and in the Problems view of Eclipse. As far as I understand, EPIC
sends the files to the perl interpreter (I am using Cygwin BTW) and interprets
the output of perl. I couldn't find any possibility to set environment variables
inside Eclipse to avoid this. I would not like to set the variables globally
(on Windows). Of course, if I run or debug the script, I can easily set
the environment ...)

Any ideas?

Thanks in advance, 

  Gerd 
mannih2001 wrote on Wed Jan 23 10:38:54 CET 2008:
What is the exact error you are seeing? EPIC will only check the syntax
of you code and the syntax you gave in your example is perfectly fine. I
don't get any errors or warnings for code like the from EPIC.

Regards,
Manni
ascheman wrote on Wed Jan 23 13:16:10 CET 2008:
It underlines the warning in red and presents a red bullet on the left margin
- the balloon pop up  has exactly the text of the warning. The same holds
for the Problems view ...

I have played around with the problem: It only occurs, if the warning is
set in an BEGIN-Block, e.g.:

BEGIN {
    warn "Env XXX not set" unless defined ($ENV{XXX});
}
mannih2001 wrote on Wed Jan 23 14:35:21 CET 2008:
I see. How about starting eclipse from a batch file/shell script that sets
those environment variables for you?

ascheman wrote on Wed Jan 23 15:07:32 CET 2008:
Of course, this works ... but I was looking for an interactive way to set
Environment variables which are forwarded to the EPIC editor dynamically.

Thanks so far!
jploski wrote on Wed Jan 23 20:48:30 CET 2008:
There is currently no way to specify the environment for the "perl -c" command
used to check syntax. I suggest that you add this to the feature request
tracker.
ascheman wrote on Thu Jan 24 13:52:34 CET 2008:
I successfully added a new feature request for it: http://sourceforge.net/tracker/index.php?func=detail&aid=1878877&group_id=75859&atid=545277

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