[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Re: Misterious Behavior of WML calling WML



On Thu, 3 Sep 1998, Stefan `Sec` Zehl wrote:

> 
> foreach $key (keys %ENV) {
>     delete $ENV{$key} if $key ne "PATH";
> }
Yeah, that deletes the ENVIRONMENT of perl, but you  have to start the WML
from that instance of perl.
that would make a call like:(maybe not fully correct quoted)
system("perl -e 'foreach (keys \%ENV){delete \$ENV{\$_} if /^PATH\$/;}
	system(\"env > test.env\");'");

system calls perl calls system, but this doesn't work.
The Problem is, that the 1st wml or eperl needs the Environment and
only the subcalls need a clean environment.
For this level,
system("perl -e '$ENV=(PATH => $ENV{PATH});system(\"env > test.env\");'
should work, too.

BUT BOTH SOLUTIONS ARE NOT WORKING!
system forks a new shell with new initalised environemnt-variables, so the
former deletion doesn't have any effect. backticks are not working, too.

So, you must delete the Environment-Variables on the same shell-levels
were you call the sub-WML. 

Maybe RSE can list all the environment-variables.
The envar I know are ^SCRIPT.* from WML in common and 
^EPERL.* from the eperl-Pass.

BYtE Oli

+++the jungle near manaos - the amazonas full of piranhas - the birds of++
+++paradies - disapear into the green desert - for years an years we're+++
+++hungry and desperate - for the only thing worth living - the E><CESS+++
+++oliver@paukstadt.de+++http://www.paukstadt.de++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 

______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com