in reply to Loading arbitrary modules

Personally, I don't think I've ever needed to use/require a single, specific module whose name is not known when I write the code, so I've never had cause to do quite what your examples illustrate.

When I am loading modules which can't be pulled in with just a plain, eval-free use, I'm grabbing everything in the Foo::Bar::* namespace (they're usually plugins or something similar), so I use Module::Pluggable to handle it:

use Module::Pluggable instantiate => 'register', search_path => ['Foo::Bar']; { my @plugins = plugins(undef, $hooks); }