]> Sergey Matveev's repositories - public-inbox.git/commitdiff
rename LeiDaemon package to PublicInbox::LEI
authorEric Wong <e@80x24.org>
Thu, 17 Dec 2020 03:53:13 +0000 (03:53 +0000)
committerEric Wong <e@80x24.org>
Sat, 19 Dec 2020 09:32:08 +0000 (09:32 +0000)
"LEI" is an acronym, and ALL CAPS is consistent with existing
PublicInbox::{IMAP,HTTP,NNTP,WWW} naming for top-level modules,
3 of 4 old ones which deal directly with sockets and requests.

MANIFEST
lib/PublicInbox/LEI.pm [moved from lib/PublicInbox/LeiDaemon.pm with 99% similarity]
script/lei
t/lei-oneshot.t
t/lei.t

index 898766e7c26f0d12916aebdeea0c777508053995..29b47843345e8f580b931e280d9cf6c01fcb9d79 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -159,7 +159,7 @@ lib/PublicInbox/InboxIdle.pm
 lib/PublicInbox/InboxWritable.pm
 lib/PublicInbox/Isearch.pm
 lib/PublicInbox/KQNotify.pm
-lib/PublicInbox/LeiDaemon.pm
+lib/PublicInbox/LEI.pm
 lib/PublicInbox/LeiSearch.pm
 lib/PublicInbox/LeiStore.pm
 lib/PublicInbox/Linkify.pm
similarity index 99%
rename from lib/PublicInbox/LeiDaemon.pm
rename to lib/PublicInbox/LEI.pm
index 56f4aa7daf9bd646d87503465d13ab9c854672b6..b5ba1f71442e895acec6a508cd712ce96d3df90d 100644 (file)
@@ -5,7 +5,7 @@
 # PublicInbox::Daemon, this is designed exclusively to handle trusted
 # local clients with read/write access to the FS and use as many
 # system resources as the local user has access to.
-package PublicInbox::LeiDaemon;
+package PublicInbox::LEI;
 use strict;
 use v5.10.1;
 use parent qw(PublicInbox::DS);
index fce088e9336473d3988e05981fc7cc5c631a1fb4..e59e4316785639960b6f708693b9849c46c2db61 100755 (executable)
@@ -23,8 +23,8 @@ if (eval { require IO::FDPass; 1 }) { # use daemon to reduce load time
        unless ($sock) { # start the daemon if not started
                my $err = $! + 0;
                my $env = { PERL5LIB => join(':', @INC) };
-               my $cmd = [ $^X, qw[-MPublicInbox::LeiDaemon
-                       -E PublicInbox::LeiDaemon::lazy_start(@ARGV)],
+               my $cmd = [ $^X, qw[-MPublicInbox::LEI
+                       -E PublicInbox::LEI::lazy_start(@ARGV)],
                        $path, $err ];
                require PublicInbox::Spawn;
                waitpid(PublicInbox::Spawn::spawn($cmd, $env), 0);
@@ -59,6 +59,6 @@ if (eval { require IO::FDPass; 1 }) { # use daemon to reduce load time
                die $line;
        }
 } else { # for systems lacking IO::FDPass
-       require PublicInbox::LeiDaemon;
-       PublicInbox::LeiDaemon::oneshot(__PACKAGE__);
+       require PublicInbox::LEI;
+       PublicInbox::LEI::oneshot(__PACKAGE__);
 }
index 848682eecaf5c1a14af6109612bd68ec6a308af8..3b8e412d3972abdbd47d15da92d41851f750aa09 100644 (file)
@@ -13,8 +13,8 @@ use subs qw(exit);
 sub main {
 # the below "line" directive is a magic comment, see perlsyn(1) manpage
 # line 1 "lei-oneshot"
-       require PublicInbox::LeiDaemon;
-       PublicInbox::LeiDaemon::oneshot(__PACKAGE__);
+       require PublicInbox::LEI;
+       PublicInbox::LEI::oneshot(__PACKAGE__);
        0;
 }
 1;
diff --git a/t/lei.t b/t/lei.t
index 53268908216291ff633db0415609945cebb82a33..7ecadf7dcdba4dd7f353798fd45b122b54906b41 100644 (file)
--- a/t/lei.t
+++ b/t/lei.t
@@ -159,7 +159,7 @@ SKIP: {
        $test_lei_common = undef;
 };
 
-require_ok 'PublicInbox::LeiDaemon';
+require_ok 'PublicInbox::LEI';
 $LEI = 'lei-oneshot' if $test_lei_oneshot;
 $test_lei_common->() if $test_lei_common;