in reply to Need help in dynamically loading a module
There’s More Than One Way To Do It.™
I use this technique successfully in a hairy old FastCGI program which employs Perl modules for its (hundreds of...) individual screen handlers. At one time, this site was very popular with hardware vendors who touted just how much RAM a particular unit could hold. Now, web page handlers are loaded on-demand, and the processes intentionally die-off after processing a few ten-thousand requests so that the modules don’t accumulate over the course of days or weeks of uptime. The key modules used all the time and by everyone are brought in at startup time by use. Once a module has been loaded once, it stays, and (AFAIK...!) nothing further happens if any of them are requested again.