eval {require Module}; unless ($@) { require Module; import Module; # do stuff with Module }