diff options
author | Peter Powell <petpow@saberuk.com> | 2012-11-07 09:07:43 +0000 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-11-08 01:07:38 +0100 |
commit | 999ba802d61bdc188858e3c1b9fb0d974f537779 (patch) | |
tree | ce66b176f53efa0f78ce07d256d9d485ff05bb55 /make/configure.pm | |
parent | e74da8e6e931326ef833c7bd5bab2fff72360382 (diff) |
Fix ModuleManager failing when:
- LWP::Simple is not installed.
- Crypt::SSLeay or IO::Socket::SSL are not installed.
This fixes #154.
Diffstat (limited to 'make/configure.pm')
-rw-r--r-- | make/configure.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/make/configure.pm b/make/configure.pm index b8e39598a..606483e98 100644 --- a/make/configure.pm +++ b/make/configure.pm @@ -31,7 +31,7 @@ use warnings FATAL => qw(all); use Exporter 'import'; use POSIX; use make::utilities; -our @EXPORT = qw(promptnumeric dumphash is_dir getmodules getrevision getcompilerflags getlinkerflags getdependencies nopedantic resolve_directory yesno showhelp promptstring_s); +our @EXPORT = qw(promptnumeric dumphash is_dir getmodules getrevision getcompilerflags getlinkerflags getdependencies nopedantic resolve_directory yesno showhelp promptstring_s module_installed); my $no_git = 0; @@ -193,6 +193,13 @@ sub promptnumeric($$) } } +sub module_installed($) +{ + my $module = shift; + eval("use $module;"); + return !$@; +} + sub promptstring_s($$) { my ($prompt,$default) = @_; |