Checking for Perl Modules
A while ago I lamented that finding out if your local Perl install has a specific module installed is tricky. Turns out that courtesy of the Perldoc page on threads that it's even simpler:
my $has_module = eval 'use My::Module; 1';
if ($has_module) {
use_module();
}
else {
dont_use_module();
}
P.S., Hawaii is very nice.
No comments:
Post a Comment