about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>1999-05-05 06:42:22 +0000
committerGraham Barr <gbarr@pobox.com>1999-05-05 06:42:22 +0000
commitaa316052e1d5af463c1d3b08e7c4b20a503fa286 (patch)
treeaf5378547f9acd173a285d5b756c7a4ac1fd987c
parentd8d7e75c6adcac4cd80239eafd41f10e642a43d8 (diff)
downloadperl-libnet-aa316052e1d5af463c1d3b08e7c4b20a503fa286.tar.gz
Net::POP3
- The return value for apop is now the same as login

-rw-r--r--Net/POP3.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/Net/POP3.pm b/Net/POP3.pm
index 670d271..a2d5c0f 100644
--- a/Net/POP3.pm
+++ b/Net/POP3.pm
@@ -13,7 +13,7 @@ use Net::Cmd;
 use Carp;
 use Net::Config;
 
-$VERSION = "2.19"; # $Id: //depot/libnet/Net/POP3.pm#13 $
+$VERSION = "2.19"; # $Id: //depot/libnet/Net/POP3.pm#14 $
 
 @ISA = qw(Net::Cmd IO::Socket::INET);
 
@@ -124,9 +124,10 @@ sub apop
  return undef
     unless($me->_APOP($user,$md->hexdigest));
 
- $me->message =~ /(\d+)\s+message/io;
+ my $ret = ${*$me}{'net_pop3_count'} = ($me->message =~ /(\d+)\s+message/io)
+        ? $1 : ($me->popstat)[0];
 
- ${*$me}{'net_pop3_count'} = $1 || 0;
+ $ret ? $ret : "0E0";
 }
 
 sub user