in reply to Dynamically requiring a module
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 Section
Seekers of Perl Wisdom