X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FPOP3.pm;fp=lib%2FPublicInbox%2FPOP3.pm;h=82df257c2d7002d910ef3d35753512672cacac32;hb=69a839362deecd86771f306f20ff993f9c9c07c1;hp=c993e558db09c2fbd8de5a15f342099fe6fc4ccd;hpb=1c457e08d2bb3352bdddde0a3580ff37f317cc72;p=public-inbox.git diff --git a/lib/PublicInbox/POP3.pm b/lib/PublicInbox/POP3.pm index c993e558..82df257c 100644 --- a/lib/PublicInbox/POP3.pm +++ b/lib/PublicInbox/POP3.pm @@ -45,11 +45,6 @@ use constant { # XXX FIXME: duplicated stuff from NNTP.pm and IMAP.pm -sub err ($$;@) { - my ($self, $fmt, @args) = @_; - printf { $self->{pop3d}->{err} } $fmt."\n", @args; -} - sub out ($$;@) { my ($self, $fmt, @args) = @_; printf { $self->{pop3d}->{out} } $fmt."\n", @args; @@ -364,8 +359,8 @@ sub process_line ($$) { \"-ERR command not recognized\r\n"; my $err = $@; if ($err && $self->{sock}) { - chomp($l); - err($self, 'error from: %s (%s)', $l, $err); + $l =~ s/\r?\n//s; + warn("error from: $l ($err)\n"); $res = \"-ERR program fault - command not performed\r\n"; } defined($res) ? $self->write($res) : 0;