The first faulty scenario can be solved by placing library modules in a subdirectory structure so that they have different path prefixes. The new filesystem layout will be:
projectA/ProjectA/MyConfig.pm projectA/run.pl projectB/ProjectB/MyConfig.pm projectB/run.pl
The run.pl scripts will need to be modified accordingly:
use ProjectA::MyConfig;
and:
use ProjectB::MyConfig;
However, if later on we want to add a new script to either of these projects, we will hit the problem described by the second problematic scenario, so this is only half a solution.
 
Continue to: