]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Daemon.pm
daemon: avoid polluting the main package
[public-inbox.git] / lib / PublicInbox / Daemon.pm
index 45c1563478a3c9adfa3ccd33de566d2bb0605c0b..77ab2a71c166ba39b7844c8186baeec3bf1530ab 100644 (file)
@@ -1,10 +1,8 @@
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
-package PublicInbox::Daemon; # empty class :p
-
 # contains common daemon code for the nntpd and httpd servers.
 # This may be used for read-only IMAP server if we decide to implement it.
-package main;
+package PublicInbox::Daemon;
 use strict;
 use warnings;
 use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/;
@@ -383,7 +381,7 @@ sub daemon_loop ($$) {
 }
 
 
-sub daemon_run ($$$) {
+sub run ($$$) {
        my ($default, $refresh, $post_accept) = @_;
        daemon_prepare($default);
        daemonize();