You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by fREW Schmidt <fr...@gmail.com> on 2009/01/15 05:31:46 UTC

Setting the CWD

I am writing a CGI::App and I keep having to use full paths to get
various places in my application.  How can I set the CWD for a certain
Location section of my code?

Thanks!

-- 

-fREW

Re: Setting the CWD

Posted by Adam Prime <ad...@utoronto.ca>.
fREW Schmidt wrote:
> I am writing a CGI::App and I keep having to use full paths to get
> various places in my application.  How can I set the CWD for a certain
> Location section of my code?

If you're running your CGI::App code through Registry, and using
mod_perl 2, and running under the prefork MPM, then you can instead use
RegistryPrefork instead of registry, which is exactly the same except it
 does the chdir you're asking for.

HTH,

Adam