From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id ED79B1FF9C for ; Fri, 18 Dec 2020 12:09:51 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 12/26] rename LeiDaemon package to PublicInbox::LEI Date: Fri, 18 Dec 2020 12:09:36 +0000 Message-Id: <20201218120950.23272-13-e@80x24.org> In-Reply-To: <20201218120950.23272-1-e@80x24.org> References: <20201218120950.23272-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: "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 | 2 +- lib/PublicInbox/{LeiDaemon.pm => LEI.pm} | 2 +- script/lei | 8 ++++---- t/lei-oneshot.t | 4 ++-- t/lei.t | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) rename lib/PublicInbox/{LeiDaemon.pm => LEI.pm} (99%) diff --git a/MANIFEST b/MANIFEST index 898766e7..29b47843 100644 --- 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 diff --git a/lib/PublicInbox/LeiDaemon.pm b/lib/PublicInbox/LEI.pm similarity index 99% rename from lib/PublicInbox/LeiDaemon.pm rename to lib/PublicInbox/LEI.pm index 56f4aa7d..b5ba1f71 100644 --- a/lib/PublicInbox/LeiDaemon.pm +++ b/lib/PublicInbox/LEI.pm @@ -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); diff --git a/script/lei b/script/lei index fce088e9..e59e4316 100755 --- a/script/lei +++ b/script/lei @@ -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__); } diff --git a/t/lei-oneshot.t b/t/lei-oneshot.t index 848682ee..3b8e412d 100644 --- a/t/lei-oneshot.t +++ b/t/lei-oneshot.t @@ -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 53268908..7ecadf7d 100644 --- 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;