eval { use Fictitious::Module };
Use require, not use. use is executed at compile time of that code fragment, before the eval executes.
See also BEGIN — because use behaves like* a require with BEGIN wrapped around it.
___
* roughly like, that is. If you want to import stuff, you have to call import explicitly when you use require. See the mentioned docs for details.
In reply to Re: Base script behavior on presence (or non-) of a module
by Eliya
in thread Base script behavior on presence (or non-) of a module
by chexmix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |