my $module = $ver > 2 ? 'Config' : 'Settings'; require $module; sub get_conf_val { no strict qw/refs/; return ${"$module\::CONFIG"}{shift()}; } my $val = get_conf_val('conf_data_name');
In reply to Re: Dynamically requiring a module
by Bloodnok
in thread Dynamically requiring a module
by balachandran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |