Re: Solution for: Re: $ENV{PATH} set by mod_perl script affects mod_cgi scripts

2000-06-06 Thread Dirk Lutzebaeck

Ben Cohen writes:
 > Go to the line that reads:
 > 
 >  eval { &{$cv}($r, @_) } if $r->seqno;

I love perl :)

Dirk




Re: Solution for: Re: $ENV{PATH} set by mod_perl script affects mod_cgi scripts

2000-06-05 Thread Ken Williams

[EMAIL PROTECTED] (Ben Cohen) wrote:
>{begin quote}
>
>I assume you are running with Apache:Registry?
>
>You could also save off the $ENV{PATH}...
>
>
>Go to the line that reads:
>
> eval { &{$cv}($r, @_) } if $r->seqno;
>
>
>And before it have something like
>
>$ENV{OLD_PATH} = $ENV{PATH}
>
>and after it
>
>$ENV{PATH} = $ENV{OLD_PATH}
>
>
>{end quote}


A better solution would be to do "local $ENV{PATH} = $ENV{PATH};".  Let
Perl clean up after you, especially if your script dies in mid-run.

The same technique is used for $^W in RegistryNG.


  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum