Skip Menu |

This queue is for tickets about the Net-IMAP-Simple CPAN distribution.

Report information
The Basics
Id: 9273
Status: resolved
Priority: 0/
Queue: Net-IMAP-Simple

People
Owner: CFABER [...] cpan.org
Requestors: lars [...] thegler.dk
LTHEGLER [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.95
Fixed in: (no value)



Subject: [PATCH] Fix problem with multiple-line output
Hi, In _process_cmd(), when the IMAP server returns multiple-line output, the _cmd_ok() method returns undef, causing the while loop to be re-executed. But since the first evaluation of this return value is a '==', this results in the following warning: --cut-- Use of uninitialized value in numeric eq (==) at /usr/local/lib/perl5/site_perl/5.8.5/Net/IMAP/Simple.pm line 508. --cut-- The attached patch avoids this. /Lars
--- /usr/local/lib/perl5/site_perl/5.8.5/Net/IMAP/Simple.pm.orig Fri Dec 31 00:30:08 2004 +++ /usr/local/lib/perl5/site_perl/5.8.5/Net/IMAP/Simple.pm Fri Dec 31 00:36:26 2004 @@ -505,7 +505,7 @@ my $res; while ( $res = $sock->getline ) { my $ok = $self->_cmd_ok($res); - if ( $ok == 1 ) { + if ( defined($ok) && $ok == 1 ) { return $args{final}->($res); } elsif ( defined($ok) && ! $ok ) { return;