I've sometimes solved problems like this using environment variables. I'll use variables for the "root" of the project, and set PERL5LIB to the directories for the current environment. I set the production values in Apache's httpd.conf, and when I'm testing I set them from a script.