Better using local in such case (I think..)
{ local $@; eval "use Capture::Tiny qw(capture)"; if ( !$@ ) { $HAVE_Capture_Tiny = 1; } }
See also eval, DESTROY, die and $@ - educational couple of hours
L*
In reply to Re^4: Help Changing use into require/import
by Discipulus
in thread Help Changing use into require/import
by computergeek
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |