You may want to look at Apache::Dispatch, which can automatically load modules as needed. As samtregar pointed out though, you will eventually want to load all the modules you use in your startup.pl to save memory. At that point, Apache::Dispatch would just be helping to map URLs to modules.