in reply to how to determine whether a module is installed or not?
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; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to determine whether a module is installed or not?
by slayedbylucifer (Scribe) on Dec 28, 2010 at 06:50 UTC | |
by tilly (Archbishop) on Dec 28, 2010 at 07:29 UTC |