Passing OS environment for editing perl files

Help
2008-01-23
2013-05-20
  • Gerd Aschemann

    Gerd Aschemann - 2008-01-23

    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

     
    • Manni

      Manni - 2008-01-23

      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

       
    • Gerd Aschemann

      Gerd Aschemann - 2008-01-23

      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});
      }

       
      • Manni

        Manni - 2008-01-23

        I see. How about starting eclipse from a batch file/shell script that sets those environment variables for you?

         
    • Gerd Aschemann

      Gerd Aschemann - 2008-01-23

      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!

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks