http://www.perlmonks.org?node_id=1000345


in reply to Use variable as a module during runtime.

Consider perldoc -f require.

A far more thorough approach:   UNIVERSAL::require.

Consider also the source-code found in RPC::Any::Server.   Here is a system that is designed to invoke packages and (selected... controllable...) methods within them.   It should be a good source of ideas.