diff options
Diffstat (limited to 'Net/POP3.pm')
-rw-r--r-- | Net/POP3.pm | 7 |
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 |