in reply to Conditionally including modules

This may look slightly off-topic, but I don't think it is (it simply isn't a solution to your problem, but clearly illustrates a path you can follow).

Here's how Lingua::Identify loads all the Lingua::Identify submodules without having any information on which modules those are (it first searches them and it then loads them, but note that I take a step to prevent from loading modules that don't look like language modules (perhaps future configuration files?)):

use Class::Factory::Util; for ( Lingua::Identify->subclasses() ) { /^[A-Z][A-Z]$/ || next; eval "require Lingua::Identify::$_ ;"; $languages{_versions}{lc $_} >= 0.01 || die "Required version of language $_ not found.\n"; }