in reply to mod_perl's cwd not the same as the scripts location.
You should never assume that the current working directory will be the same as the directory which contains the script. Indeed, most of my scripts live in a directory other than the one from which I use them. I put the scripts in my ~/bin and then let the shell figure out where they are when it traverses $PATH.
You can look at things like FindBin to see if they'll work for you. I wouldn't try to change the current working directory in a mod_perl process: just use the right path when you want to do things like opendir(). To make things compatible and portable, you can set the base directory you want in the server configuration (or .htaccess or whatever) as an environment variable and go from there.
It's not really a mod_perl problem, although as most people find out, mod_perl exposes a lot of things you've been getting away with.
|
|---|