- LWP::Simple is not installed.
- Crypt::SSLeay or IO::Socket::SSL are not installed.
This fixes #154.
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;
}
}
+sub module_installed($)
+{
+ my $module = shift;
+ eval("use $module;");
+ return !$@;
+}
+
sub promptstring_s($$)
{
my ($prompt,$default) = @_;
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;