perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Perrin Harkins" <>
Subject Re: Problems using Apache::Reload
Date Sun, 01 Jul 2007 14:26:39 GMT
On 7/1/07, Clinton Gormley <> wrote:
> This is one of the gotchas I mentioned before: CHDIR.
> You can't rely on it.  Something somewhere (maybe Registry itself) is
> changing the current dir, so '.' now refers to / rather than
> to /path/to/your/modules.

It's actually not that something is doing a chdir, but that Registry
is NOT doing one.  In a CGI environment, the current directory is
always set to the directory where the script lives.  Unfortunately,
this is not safe for a threaded environment, so Registry doesn't do it
by default.

A subclass of Registry that deals with this is included in the
mod_perl distribution.  It's called ModPerl::RegistryPrefork.  There's
more explanation here:

- Perrin

View raw message