I use the $haveModule = eval { require Module; 1; } idiom fairly frequently,
I think anonymonk has explained the problem, but I just wanted to ask you what advantages you see in detecting module absence at runtime via require, over compile-time as would happen with use?
In reply to Re: Why does Capture::Tiny require loading via BEGIN to successfully function?
by BrowserUk
in thread Why does Capture::Tiny require loading via BEGIN to successfully function?
by Wyrdweaver
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |