I usually do something like this early on in my code:
I can then react accordingly later on:my $HAVE_MODULE = eval 'require Some::Module; 1' ? 1 : 0;
if ($HAVE_MODULE) { do_stuff(); } else { do_something_else(); }
In reply to Re: Testing for a module's presence
by vek
in thread Testing for a module's presence
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |