From the documentation for use:
use Module LIST ... is exactly equivalent to
BEGIN { require Module; Module->import( LIST ); }
So, simply convert any use statements that might fail into the equivalent require statements, and your strategy of testing them dynamically using eval will then work OK.
(BTW, there should be no need to test the pragmas use strict and use warnings in this way.)
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re: Can I retry "use" when module load fails?
by Athanasius
in thread Can I retry "use" when module load fail ?
by exilepanda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |