in reply to Can I retry "use" when module load fail ?
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, |
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Can I retry "use" when module load fails?
by exilepanda (Friar) on Apr 15, 2013 at 04:52 UTC | |
by NetWallah (Canon) on Apr 15, 2013 at 05:42 UTC | |
by exilepanda (Friar) on Apr 15, 2013 at 06:15 UTC | |
by NetWallah (Canon) on Apr 15, 2013 at 06:47 UTC | |
by exilepanda (Friar) on Apr 15, 2013 at 06:57 UTC | |
|
In Section
Seekers of Perl Wisdom