Another option besides what has already been given would be to use Module::Load.
use Module::Load; my $config = 'Config'; my $settings = 'Settings'; my $ver = 3; load $ver > 2 ? $config : $settings;
In reply to Re: Dynamically requiring a module
by fishmonger
in thread Dynamically requiring a module
by balachandran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |