]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix ModuleManager failing when:
authorPeter Powell <petpow@saberuk.com>
Wed, 7 Nov 2012 09:07:43 +0000 (09:07 +0000)
committerattilamolnar <attilamolnar@hush.com>
Thu, 8 Nov 2012 00:07:38 +0000 (01:07 +0100)
- LWP::Simple is not installed.
- Crypt::SSLeay or IO::Socket::SSL are not installed.

This fixes #154.

make/configure.pm
modulemanager

index b8e39598a35fb9ce34a494a3358565f798f6fc79..606483e98d8619656751302d0a661839c7a0b898 100644 (file)
@@ -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) = @_;
index ff2bd3056137768cba3fa6cf69b10bb989c12f0c..d1212faf5770f6ce01a784123c6d8462e14ae91a 100755 (executable)
 
 use strict;
 use warnings FATAL => qw(all);
-use LWP::Simple;
 
 use make::configure;
 
+
+if (!module_installed("LWP::Simple"))
+{
+       die "Your system is missing the LWP::Simple Perl module!";
+}
+
+if (!module_installed("Crypt::SSLeay") && !module_installed("IO::Socket::SSL"))
+{
+       die "Your system is missing the Crypt::SSLeay or IO::Socket::SSL Perl modules!";
+}
+
+use LWP::Simple;
+
 our @modlist;
 
 my %installed;