Doug MacEachern wrote:
> On Tue, 9 Apr 2002, Stas Bekman wrote:
>
>
>>I'm not sure that's a good idea. It may break someone's code, who didn't
>>expect the cwd to be in @INC. should the control to automatically
>>prepand to @INC be given to users here?
>
> to be safer, could just replace any @INC value of '.' with cwd.
that doesn't solve the problem for those expecting @INC to be
un-modified behind the scenes.
you suggested to solve this with: push @INC, $cwd
consider this part of some 1.x registry script:
require Foo; # doesn't modify @INC
if following your suggestion and I've happened to have Foo in the $cwd,
it'll be erroneosly loaded.
>>what if their code is doing chdir? do we simply say, you have to get rid
>>of chdirs, no matter what?
>
>
> yes, i suppose so. we might even want to add CORE::GLOBAL::chdir that
> croaks if running in a threaded MPM.
cool!
>>Oh, wait, users *cannot* use Apache::Registry from 1.x with threaded mpm
>>by definition since it does chdir to the scripts dir.
>
>
> not an issue, 1.x calls $r->chdir_file
> which is a noop in Apache::compat.
oops, right, and it has:
sub chdir_file {
#XXX resolve '.' in @INC to basename $r->filename
}
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]