use Module::Load::Conditional qw[can_load check_install requires]; $Module::Load::Conditional::VERBOSE = 1; my $crypt_mods = {'Crypt::CBC' => undef, 'Crypt::Blowfish' => undef, 'Digest::SHA1' => undef, 'MIME::Base64' => undef, 'Compress::Zlib' => undef, 'Crypt::DH' => undef}; if (( can_load(modules=> {'Math::BigInt::GMP' => undef}, verbose => 1) || can_load(modules=> {'Math::BigInt' => undef}, verbose => 1)) && can_load(modules => $crypt_mods, verbose => 1)) { $encryption_avail = 1; } print $encryption_avail ? "All required crypto modules found and loaded: Encryption available\n" : "Encryption disabled: required modules not found\n";