74_Nmap: return error if Nmap::Parser is not installed

git-svn-id: https://svn.fhem.de/fhem/trunk@13768 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
igami
2017-03-22 11:23:59 +00:00
parent dfc5ee5148
commit 41256ba4b4

View File

@@ -29,7 +29,14 @@ package main;
use Blocking;
use Nmap::Parser;
my $rc = eval{
require Nmap::Parser;
Nmap::Parser->import();
1;
};
return("Error loading Nmap::Parser. Maybe this module is not installed?")
unless($rc);
# forward declarations ########################################################
sub Nmap_Initialize($);