Subject: | Bug in Net::POP3 Module Version: 2.29 |
Date: | Thu, 25 Dec 2008 12:04:17 +0200 |
To: | bug-libnet [...] rt.cpan.org |
From: | "Avraham Schneider" <avri.schneider [...] gmail.com> |
Use of uninitialized value in numeric eq (==) at
C:/Perl/lib/Net/POP3.pm line 316.
at C:/Perl/lib/Net/POP3.pm line 316
Net::POP3::_QUIT('Net::POP3=GLOB(0x3c2dca4)') called at
C:/Perl/lib/Net/POP3.pm line 335
sub response {
my $cmd = shift;
my $str = $cmd->getline() or return undef; <================ bug
is here ==== response() may return undef
Here the code assumes response() returns an integer:
=======================================
unless ($obj->response() == CMD_OK) {
sub _STAT { shift->command('STAT')->response() == CMD_OK }
sub _LIST { shift->command('LIST', @_)->response() == CMD_OK }
sub _RETR { shift->command('RETR', $_[0])->response() == CMD_OK }
sub _DELE { shift->command('DELE', $_[0])->response() == CMD_OK }
sub _NOOP { shift->command('NOOP')->response() == CMD_OK }
sub _RSET { shift->command('RSET')->response() == CMD_OK }
sub _QUIT { shift->command('QUIT')->response() == CMD_OK }
sub _TOP { shift->command('TOP', @_)->response() == CMD_OK }
sub _UIDL { shift->command('UIDL', @_)->response() == CMD_OK }
sub _USER { shift->command('USER', $_[0])->response() == CMD_OK }
sub _PASS { shift->command('PASS', $_[0])->response() == CMD_OK }
sub _APOP { shift->command('APOP', @_)->response() == CMD_OK }
sub _PING { shift->command('PING', $_[0])->response() == CMD_OK }
sub _RPOP { shift->command('RPOP', $_[0])->response() == CMD_OK }
sub _LAST { shift->command('LAST')->response() == CMD_OK }
sub _CAPA { shift->command('CAPA')->response() == CMD_OK }
if ($this->command('AUTH')->response() == CMD_OK) {