Hello, I have a problem, and I have a poor solution; I would like to see if I can do even better. My problem is that I have a set of scripts and modules that are duplicated on the same Apache server setup. One tree is for debugging and developing, the other is the main release site. These are managed through cvs. The issue I ran into was that the debug scripts would request debug modules, but get the same-named release module if it was already loaded in the same Apache process (and vice versa).
Here what my old (buggy under mod_perl) include stuff was like: use lib "../lib"; use MyModule; Here is what I had to do to force correct module loading (mostly stolen from the great mod_perl guide): %INC = (); # Possibly unnecessary do 'FindBin.pm'; unshift @INC, "$FindBin::Bin"; # There are also modules in the same dir as the script unshift @INC, "$FindBin::Bin/../lib/"; require MyModule; import MyModule; So I'm loosing all of that slick compile-time speed savings and clean code just so I can have two source trees on the same server. One obvious answer is to move the devel tree off of the same server as the release tree. I will eventually do that, but it would be cool to see a solution that works with my current setup. Is there maybe a way to do tricks to modules like Apache::Registry does to scripts by automagically prepending the directory name behind the scenes? Any other ideas or places to RTFM? Thanks, John Heitmann