On Thu, Aug 22, 2002 at 06:56:08PM +0800, Stas Bekman wrote:
> Arthur Bergman wrote:
> >
> > On torsdag, augusti 22, 2002, at 10:12 , Stas Bekman wrote:
> >
> >>
> >> Do what? Set env vars? Of course it should... if it's safe. But as you
> >> can see from the recent mod_perl thread about Oracle DBD not working
> >> with mod_perl 2.0 when %ENV was set in the registry script, since %ENV
> >> isn't tied to environ, because it's not thread safe. I wrote this
> >> module to debug the case, since I don't have Oracle to test with.
> >>
> >> This module was only needed for getenv() and dumpenv() so those who
> >> don't know C can at least debug things. But I've generalized it and
> >> added setenv() and unsetenv() while I was at it.
> >>
> >>
> >
> > %ENV{} should be identicial between all threads, anything else is surely
> > a bug!
>
> Certainly. But this is a different issue.
>
> What I was saying is that %ENV doesn't have to be the same as environ.
I have only been following this thread a little. But is the underlying
problem not that perl only reads env variables once and caches the
result. so if a C library changes it, perl cannot read that variable.
Graham.