mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
98_inotify.pm: better check for perl modules
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@18473 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c975e7213c
commit
e0d3faf713
@ -4,18 +4,37 @@ package main;
|
|||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Linux::Inotify2;
|
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
my $missingModule = "";
|
my $missingModule = "";
|
||||||
|
|
||||||
|
eval { use Linux::Inotify2; };
|
||||||
|
|
||||||
|
unless($@) {
|
||||||
|
Log 4, "inotify - found Linux::Inotify2";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Log 1, "inotify - unable to load Linux::Inotify2 module: $@. Please install with sudo apt-get install liblinux-inotify2-perl";
|
||||||
|
$missingModule = "Linux::Inotify2 ";
|
||||||
|
}
|
||||||
|
|
||||||
|
eval { use File::Find; };
|
||||||
|
|
||||||
|
unless($@) {
|
||||||
|
Log 4, "inotify - found File::Find";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Log 1, "inotify - unable to load File::Find module: $@. Please install it.";
|
||||||
|
$missingModule = "File::Find ";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
eval "use File::Find;1" or $missingModule .= "File::Find ";
|
eval "use File::Find;1" or $missingModule .= "File::Find ";
|
||||||
|
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
# Global variables
|
# Global variables
|
||||||
my $version = "0.5.8";
|
my $version = "0.6.1";
|
||||||
our $inotify;
|
our $inotify;
|
||||||
our @watch;
|
our @watch;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user