Access to OS Environment Variables

Help
Jean-Louis
2004-07-15
2013-05-20
  • Jean-Louis

    Jean-Louis - 2004-07-15

    Is there a way of passing environment variables to the perl script execution within Eclipse?

    Typically, I'd like to have sthg like this in my script:

    use Env;
    my $XYZ = $ENV{"XYZ"};

    Thanks,
    JL

     
    • Ben Imp

      Ben Imp - 2004-07-20

      perldoc env

      or is that not what you are looking for?

       
    • Anonymous - 2004-08-04

      Hi!

      I think you have the same problem as i.

      I need to have the _complete_ environment from the
      os in the the %ENV hash (perl standard)

      if you have a program, say "test.pl" with the code of
      #!/usr/bin/perl
      print $ENV{'PATH'};

      this will show the PATH Environment on the console (normaly something like "/bin:/usr/bin:/usr/local/bin:..."

      but if you run the same program out of the epic / eclipse plugin you won't get any output, because the
      %ENV Hash is empty / not set, so the program is started without any OS-Environment, which is the root cause.

      The question is now, is there any possibility to give the epic/eclipse an environment _before_ starting the perl program out of eclipse?

      if that is possible that would be the solution.

      (In my case, i need to set the LD_LIBRARY_PATH Envirionment before running the perl program...)

      thanx a lot!

      Michael

       
      • Jean-Louis

        Jean-Louis - 2004-08-04

        Hi,

        This is exactly the problem.  I haven't found any solution, and I am not sure there is one at the moment.  I have resorted to using komodo (www.activestate.com).  It is buggy but it does load up the environment that is set up before you invoke it.  You can also modify it afterwards.

        If you happen to find a solution re. epic, I'd be interested.

        Thanks,
        JL

         
        • Jochen Ruehl

          Jochen Ruehl - 2004-08-04

          Hi,

          setting environment variables is on our TODO list.
          It will be implemented the way it now works for running/debugging CGI scripts.
          But don't expect it too soon, because Stephan (the developer of the debugger) is on vacation for two weeks.

          Bye
          Jochen

           
    • Anonymous - 2004-08-05

      Hi!

      Well, that's good to hear!
      Tell him a happy holiday!

      Bye
      Michael

      For now, I copy the rquired .so libraries in some Solaris-Standarpaths, which isn't system conform, but works.... (very dirty..)

       
  • Will

    Will - 2011-06-06

    Six years later and this is still a bug.
    Did Stephan ever come back from that holiday?

     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks