]> Sergey Matveev's repositories - public-inbox.git/commitdiff
net_reader: {nn,mic}_for: use prototypes for internal subs
authorEric Wong <e@80x24.org>
Fri, 30 Apr 2021 09:24:35 +0000 (09:24 +0000)
committerEric Wong <e@80x24.org>
Fri, 30 Apr 2021 19:59:46 +0000 (19:59 +0000)
We don't use these subs elsewhere, so stick prototypes on them
to give them a little extra checking.

lib/PublicInbox/NetReader.pm

index 3fc37b10f8b22efa52ca6ad223b3aa65a009f76a..b9365c05e37ee9126e39f5e96f3fafe37463477d 100644 (file)
@@ -27,7 +27,7 @@ sub uri_section ($) {
 sub auth_anon_cb { '' }; # for Mail::IMAPClient::Authcallback
 
 # mic_for may prompt the user and store auth info, prepares mic_get
-sub mic_for { # mic = Mail::IMAPClient
+sub mic_for ($$$$) { # mic = Mail::IMAPClient
        my ($self, $url, $mic_args, $lei) = @_;
        require PublicInbox::URIimap;
        my $uri = PublicInbox::URIimap->new($url);
@@ -133,7 +133,7 @@ E: <$uri> STARTTLS requested and failed
        $nn;
 }
 
-sub nn_for ($$$;$) { # nn = Net::NNTP
+sub nn_for ($$$$) { # nn = Net::NNTP
        my ($self, $uri, $nn_args, $lei) = @_;
        my $sec = uri_section($uri);
        my $nntp_opt = $self->{nntp_opt}->{$sec} //= {};