]> Sergey Matveev's repositories - public-inbox.git/commitdiff
http|nntp: "use PublicInbox::DS" instead of ->import
authorEric Wong <e@80x24.org>
Mon, 8 Jul 2019 07:31:19 +0000 (07:31 +0000)
committerEric Wong <e@80x24.org>
Mon, 8 Jul 2019 07:31:19 +0000 (07:31 +0000)
Relying on "use" to import during BEGIN means we get to take
advantage of prototype checking of function args during the rest
of the compilation phase.

lib/PublicInbox/HTTP.pm
lib/PublicInbox/NNTP.pm

index 5546ac465570d123d19498ef285b385b3b1ba913..60b287c434274fc5ec4a8cc1732d179c1e1e007d 100644 (file)
@@ -19,7 +19,7 @@ use HTTP::Status qw(status_message);
 use HTTP::Date qw(time2str);
 use IO::Handle;
 require PublicInbox::EvCleanup;
-PublicInbox::DS->import(qw(msg_more));
+use PublicInbox::DS qw(msg_more);
 use PublicInbox::Syscall qw(EPOLLIN EPOLLONESHOT);
 use constant {
        CHUNK_START => -1,   # [a-f0-9]+\r\n
index 6fee29f4819b384197bb64defb6f8a3fb7b6c560..6796a3c40396e542f088f89e654db4d60717eba5 100644 (file)
@@ -14,7 +14,7 @@ use PublicInbox::Git;
 require PublicInbox::EvCleanup;
 use Email::Simple;
 use POSIX qw(strftime);
-PublicInbox::DS->import(qw(now));
+use PublicInbox::DS qw(now);
 use Digest::SHA qw(sha1_hex);
 use Time::Local qw(timegm timelocal);
 use constant {