So that will attempt to 'use' MQSeries and warn if it fails. Or as a subroutineeval { require MQSeries; MQSeries->import; }; $@ and warn $@;
sub cond_use { (my $module = shift().".pm") =~ s<::></>g; eval { require $module; $module->import(@_); }; $@ and warn $@; } cond_use "MQSeries";
_________
broquaint
In reply to Re: Optional modules?
by broquaint
in thread Optional modules?
by Jeppe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |