http://qs1969.pair.com?node_id=515170


in reply to Using the perl modules depends upon the availability of another module.

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