perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <>
Subject Re: $r->chdir_file for registry revistited
Date Wed, 22 May 2002 19:43:02 GMT
On Thu, 23 May 2002, Stas Bekman wrote:
> In any case if the wrapper is used, the scripts won't work under 
> mod_cgi. On the other hand if File::Basename::dirname() is used 
> explicitly the script will still work with mod_cgi.

good point.  we should probably not bother providing something special in 
this case.  at least not something that is also added to 1.27.  2.0 can 
have something fast and clean that uses apr, which 1.x doesn't have.
> The worst thing about this workaround, no matter how we implement it, is 
> that users will have to modify their code to make this work. So the cool 
> idea of "run your scripts unaltered" doesn't work any more :(

umm, sloppy cgi scripts have always required changes to run properly in 
1.x.  one might consider depending on '.' and chdir to be sloppy.
and if that's the only change one has to make for a cgi script to also be 
thread-safe, that ain't too bad.

the goal of 2.x is to have enough compat layer so code will _run_ in 
both 1.x and 2.x.  that doesn't mean changes won't be required such as 
this case or $r->connection->user changing to $r->user.  but once the 
change is made, the code will run with both 2.x and 1.x.  that is what's 
> May be we can still have a special mode in which chdir() is performed if 
> running under non-threaded mpm? For those who need a transition period?

we should probably have it die("chdir not supported in threaded MPMs");
and warn("chdir ok in prefork MPM, will not work in threaded MPM");

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message