When I first had the problem to use a module only if it exists, I tried to just put use after the if clause. I was quite surprised that use is always used by the compiler. But for what reason anyway?unless (exists $INC{'Spreadsheet/WriteExcel.pm'}) { require Spreadsheet::WriteExcel; import Spreadsheet::WriteExcel; }
In reply to Re: %INC and eval use
by fraktalisman
in thread %INC and eval use
by bronto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |