in reply to loading modules at runtime

Once you are thinking about pluggins, you could simplify your code a little with Module::Pluggable .