No need to bring systems closer to the vm.max_map_count limit
with more .so objects loaded.
# Copyright (C) all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
-# wrap Linux::Inotify2 XS module, support pure Perl via `syscall' someday
+# loads either pure Perl inotify support or wrap Linux::Inotify2 XS module
package PublicInbox::Inotify;
use v5.12;
our @ISA;
eval "require $m";
next if $@;
$isa = $m;
+ last;
}
if ($isa) {
push @ISA, $isa;
my $buf = '';
for (qw(IN_MOVED_TO IN_CREATE IN_DELETE IN_DELETE_SELF
IN_MOVE_SELF IN_MOVED_FROM IN_MODIFY)) {
- $buf .= "*$_ = \\&PublicInbox::Inotify3::$_;\n";
+ $buf .= "*$_ = \\&${isa}::$_;\n";
}
eval $buf;
die $@ if $@;