Re: nasty env vars
Manage your shell environment variables and aliases
Brought to you by:
leomania,
xdelaruelle
From: Leo B. <le...@le...> - 2002-04-11 07:33:01
|
Mark Lakata wrote: > We have one piece of software that requires a nasty env var to be > set. The environment variable contains double-quotes and curly > braces, for example: > > BEGIN{require"/foo/init.pl"} > > (perl hackers will recognize that as perl syntax. Don't ask me who > decided to store a perl one-liner in an env var!) Hello, Mark. Sorry, I'm gonna do it... WHO IN THE @*)!(*&% did this? I am guessing it's some bit of EDA software code, but I just gotta know. > In csh, you can set it with > > setenv FOO 'BEGIN{require"/foo/init.pl"}' > > However, you will be hardpressed to get this to work in a module! > Try it! The double quotes and the curly braces will ruin your day, > so if you tried that line "as is" in your modulefile, you will get > [snip] I'd like to find a modules solution, but 30 minutes of experiments has left me as frustrated as you (no, you probably fought with it for longer than that...) so I'm going to suggest a punt -- Make a wrapper script. We've been forced into this on some programs due to overruning the PATH with all of the EDA tools we wish to load on a per-project basis, so it wouldn't be totally without precedent in our env. I hope that's not too outside the norm in yours. And in parallel, if the developer is still actively supporting the program, ask him/her to fix it. That's just plain nasty IMHO. Regards, - Leo |