I strongly suggest using Class::Load to handle this, but if you'd rather homebrew a solution...
if (eval { require Fictitious::Module; 1 }) { # code that uses Fictitious::Module } else { warn "Can't find Fictitious::Module. Soldiering on regardless..."; }
In reply to Re: Base script behavior on presence (or non-) of a module
by tobyink
in thread Base script behavior on presence (or non-) of a module
by chexmix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |