in reply to Optional modules?
Note: you'll need an 'import' in there if you also want to import exported methods etc.my $loaded; { # ignore warnings if subs are being redefined local $^W = 0; $loaded = eval "require MQSeries"; } if(!defined($loaded)) { print "Can't load MQSeries: $@\n"; }
update: Apparently 'use' does work in 'eval', I can't for the life of me remember why I thought you can't, must have been some reason that I use require.. hohum..
C.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Optional modules?
by tachyon (Chancellor) on Feb 27, 2003 at 13:02 UTC |