Linux::Inotify2 1.x lacked ->on_overflow and ->broadcast
methods. Just don't use them for now. We may eventually
provide a pure Perl alternative which doesn't require closures,
XS, or the common::sense dependency.
Overflowing the inotify queue seems difficult to trigger at
the moment: /proc/sys/fs/inotify/max_queued_events defaults
to 16384 on a my CentOS 7.x VM with 2GB RAM.
my $sock = gensym;
tie *$sock, 'PublicInbox::In2Tie', $inot;
$inot->blocking(0);
- $inot->on_overflow(undef); # broadcasts everything on overflow
+ if ($inot->can('on_overflow')) {
+ # broadcasts everything on overflow
+ $inot->on_overflow(undef);
+ }
$self->SUPER::new($sock, EPOLLIN | EPOLLET);
} else {
require PublicInbox::FakeInotify;