use if eval { require MIDI::ALSA; MIDI::ALSA->VERSION > 0.01; 1 } , 'MIDI::ALSA', ...; use if not exist $INC{'MIDI/ALSA.pm'}, 'something::else', ...;