Probably easiest is to do something like:
my $module; if ($ver > 2) { require Config; $module = "Config"; } else { require Settings; $module = "Settings"; } my $enable_foo = $module->CONFIG->{should_enable_foo};
In reply to Re: Dynamically requiring a module
by tobyink
in thread Dynamically requiring a module
by balachandran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |