diff options
-rw-r--r-- | make/common.pm | 9 | ||||
-rwxr-xr-x | modulemanager | 4 |
2 files changed, 3 insertions, 10 deletions
diff --git a/make/common.pm b/make/common.pm index f0174e0b3..6ca280bec 100644 --- a/make/common.pm +++ b/make/common.pm @@ -37,8 +37,7 @@ our @EXPORT = qw(create_directory get_cpu_count get_version read_config_file - write_config_file - module_installed); + write_config_file); sub create_directory($$) { my ($location, $permissions) = @_; @@ -90,12 +89,6 @@ sub get_version { return %version; } -sub module_installed($) { - my $module = shift; - eval("use $module;"); - return !$@; -} - sub get_cpu_count { my $count = 1; if ($^O =~ /bsd/) { diff --git a/modulemanager b/modulemanager index 2681e8326..9f9c03344 100755 --- a/modulemanager +++ b/modulemanager @@ -26,10 +26,10 @@ use warnings FATAL => qw(all); use make::common; BEGIN { - unless (module_installed("LWP::Simple")) { + unless (eval "use LWP::Simple; 1") { die "Your system is missing the LWP::Simple Perl module!"; } - unless (module_installed("Crypt::SSLeay") || module_installed("IO::Socket::SSL")) { + unless (eval "use Crypt::SSLeay; 1" || eval "use IO::Socket::SSL; 1") { die "Your system is missing the Crypt::SSLeay or IO::Socket::SSL Perl modules!"; } |