The if module may also be another option.BEGIN { $module = somecond() ? "Text::CSV" : "Text::CSV_XS"; require $module; $module->import; }
_________
broquaint
In reply to Re: using a variable to specify which perl module to use
by broquaint
in thread using a variable to specify which perl module to use
by princepawn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |