in reply to How to use variables in @INC and "use" commands

You may wish to take a different angle. Insert a higher level class between main and your module_name classes. In the new class dynamically bless the object to be the correct class at runtime. What was that? You are not using OO? Actually you don't need to, just use the blessed reference to make the calls on.
Update: Although you will still have to load all the modules :-(
  • Comment on Re: How to use variables in @INC and "use" commands