require Module2 if ! eval "require Module1";
or
use if !eval("use Module1"), 'Module2';
but be warned that "You can't use a module's compile-time magic when you conditionally use the module...".
- tye
In reply to Re: Using the perl modules depends upon the availability of another module.
by tye
in thread Using the perl modules depends upon the availability of another module.
by jesuashok
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |