Something like:
if (eval {require 'Text/LevenshteinXS.pm'}) { Text::LevenshteinXS::import('distance'); } elsif (eval {require 'Text/Levenshtein.pm'}) { Text::Levenshtein::import('distance'); } else { *distance = \&myDistanceSub; }
In reply to Re: how to determine whether a module is installed or not?
by GrandFather
in thread how to determine whether a module is installed or not?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |