lib/PublicInbox/DSKQXS.pm | 5 ++--- lib/PublicInbox/DirIdle.pm | 4 ++-- lib/PublicInbox/FakeInotify.pm | 13 ++++++------- lib/PublicInbox/In2Tie.pm | 4 ++-- lib/PublicInbox/InboxIdle.pm | 2 +- lib/PublicInbox/KQNotify.pm | 12 +++++------- diff --git a/lib/PublicInbox/DSKQXS.pm b/lib/PublicInbox/DSKQXS.pm index 4114a6af2f55f5374836ea8a948fc3cb0efdbb51..7bd7773e7225ae639c55e7d2f0811bc33c6a1dba 100644 --- a/lib/PublicInbox/DSKQXS.pm +++ b/lib/PublicInbox/DSKQXS.pm @@ -1,4 +1,4 @@ -# Copyright (C) 2019-2021 all contributors +# Copyright (C) all contributors # Licensed the same as Danga::Socket (and Perl5) # License: GPL-1.0+ or Artistic-1.0-Perl # @@ -11,8 +11,7 @@ # support cases public-inbox-nntpd/httpd care about. # # It also implements signalfd(2) emulation via "tie". package PublicInbox::DSKQXS; -use strict; -use warnings; +use v5.12; use parent qw(Exporter); use Symbol qw(gensym); use IO::KQueue; diff --git a/lib/PublicInbox/DirIdle.pm b/lib/PublicInbox/DirIdle.pm index 9206da9cb710186462ffefd10cb4af0764f7e615..55c3982f707c0f9328f4adde1e9cb90eed526126 100644 --- a/lib/PublicInbox/DirIdle.pm +++ b/lib/PublicInbox/DirIdle.pm @@ -1,9 +1,9 @@ -# Copyright (C) 2020-2021 all contributors +# Copyright (C) all contributors # License: AGPL-3.0+ # Used by public-inbox-watch for Maildir (and possibly MH in the future) package PublicInbox::DirIdle; -use strict; +use v5.12; use parent 'PublicInbox::DS'; use PublicInbox::Syscall qw(EPOLLIN); use PublicInbox::In2Tie; diff --git a/lib/PublicInbox/FakeInotify.pm b/lib/PublicInbox/FakeInotify.pm index 6d2696019d8324fc3676d4e49efb783e10efc15a..45b80f505557a95ed0cd157b36667477bee3fdc9 100644 --- a/lib/PublicInbox/FakeInotify.pm +++ b/lib/PublicInbox/FakeInotify.pm @@ -1,11 +1,10 @@ -# Copyright (C) 2020-2021 all contributors +# Copyright (C) all contributors # License: AGPL-3.0+ # for systems lacking Linux::Inotify2 or IO::KQueue, just emulates # enough of Linux::Inotify2 package PublicInbox::FakeInotify; -use strict; -use v5.10.1; +use v5.12; use parent qw(Exporter); use Time::HiRes qw(stat); use PublicInbox::DS qw(add_timer); @@ -119,7 +118,7 @@ add_timer($poll_intvl, \&poll_once, $obj); } package PublicInbox::FakeInotify::Watch; -use strict; +use v5.12; sub cancel { my ($self) = @_; @@ -132,7 +131,7 @@ (split(/\0/, $self->[1], 2))[0]; } package PublicInbox::FakeInotify::Event; -use strict; +use v5.12; sub fullname { ${$_[0]} } @@ -141,14 +140,14 @@ sub IN_MOVED_FROM { 0 } sub IN_DELETE_SELF { 0 } package PublicInbox::FakeInotify::GoneEvent; -use strict; +use v5.12; our @ISA = qw(PublicInbox::FakeInotify::Event); sub IN_DELETE { 1 } sub IN_MOVED_FROM { 0 } package PublicInbox::FakeInotify::SelfGoneEvent; -use strict; +use v5.12; our @ISA = qw(PublicInbox::FakeInotify::GoneEvent); sub IN_DELETE_SELF { 1 } diff --git a/lib/PublicInbox/In2Tie.pm b/lib/PublicInbox/In2Tie.pm index ffe26a44ab3d9e38d46447fd69543e0a9d4e5c8d..3689432b2d318d36710bd4b3c913f7ebe4c0e988 100644 --- a/lib/PublicInbox/In2Tie.pm +++ b/lib/PublicInbox/In2Tie.pm @@ -1,10 +1,10 @@ -# Copyright (C) 2020-2021 all contributors +# Copyright (C) all contributors # License: AGPL-3.0+ # used to ensure PublicInbox::DS can call fileno() as a function # on Linux::Inotify2 objects package PublicInbox::In2Tie; -use strict; +use v5.12; use Symbol qw(gensym); sub io { diff --git a/lib/PublicInbox/InboxIdle.pm b/lib/PublicInbox/InboxIdle.pm index 005e263612d409c7a794bcc2eed1e08a47ee793e..f0d8a972ed03226074bba2317180a8e9dcf6ffa5 100644 --- a/lib/PublicInbox/InboxIdle.pm +++ b/lib/PublicInbox/InboxIdle.pm @@ -5,7 +5,7 @@ # fields: # inot: Linux::Inotify2-like object # pathmap => { inboxdir => [ ibx, watch1, watch2, watch3... ] } mapping package PublicInbox::InboxIdle; -use strict; +use v5.12; use parent qw(PublicInbox::DS); use PublicInbox::Syscall qw(EPOLLIN); my $IN_MODIFY = 0x02; # match Linux inotify diff --git a/lib/PublicInbox/KQNotify.pm b/lib/PublicInbox/KQNotify.pm index 7efb8b604c99e326d02c38c3876355aa23018a35..381711fae8f400bf11b3f0bb3316c04d66207336 100644 --- a/lib/PublicInbox/KQNotify.pm +++ b/lib/PublicInbox/KQNotify.pm @@ -1,11 +1,10 @@ -# Copyright (C) 2020-2021 all contributors +# Copyright (C) all contributors # License: AGPL-3.0+ # implements the small subset of Linux::Inotify2 functionality we use # using IO::KQueue on *BSD systems. package PublicInbox::KQNotify; -use strict; -use v5.10.1; +use v5.12; use IO::KQueue; use PublicInbox::DSKQXS; # wraps IO::KQueue for fork-safe DESTROY use PublicInbox::FakeInotify qw(fill_dirlist on_dir_change); @@ -29,8 +28,7 @@ $watch = bless [ $fh, $path, $st[10] ], 'PublicInbox::KQNotify::Watchdir'; } else { open($fh, '<', $path) or return; - $watch = bless [ $fh, $path ], - 'PublicInbox::KQNotify::Watch'; + $watch = bless [ $fh, $path ], 'PublicInbox::KQNotify::Watch'; } my $ident = fileno($fh); $self->{dskq}->{kq}->EV_SET($ident, # ident (fd) @@ -100,14 +98,14 @@ @$events; } package PublicInbox::KQNotify::Watch; -use strict; +use v5.12; sub name { $_[0]->[1] } sub cancel { close $_[0]->[0] or die "close: $!" } package PublicInbox::KQNotify::Watchdir; -use strict; +use v5.12; sub name { $_[0]->[1] }