Skip Menu |

This queue is for tickets about the Mail-IMAPClient CPAN distribution.

Report information
The Basics
Id: 782
Status: resolved
Priority: 0/
Queue: Mail-IMAPClient

People
Owner: DJKERNEN__NO_SOLICITING__ [...] cpan.org
Requestors: sherwin [...] saturn.emc.com.ph
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.1.3
Fixed in: (no value)



Subject: bug in handling "Resource temporarily unavailable"
Distribution: Mail-IMAPClient-2.1.3 Perl version: v5.6.1 built for i386-linux OS: Linux 2.4.18-6mdksmp I got stumped on this error: # --- BEGIN error Use of uninitialized value in numeric gt (>) at /usr/lib/perl5/site_perl/5.6.1/Mail/IMAPClient.pm line 877. Persistent 'Resource temporarily unavailable' errors Couldn't append the message. at ./testimapattach.pl line 512. Sending: 3 LOGOUT Use of uninitialized value in numeric gt (>) at /usr/lib/perl5/site_perl/5.6.1/Mail/IMAPClient.pm line 877. Persistent 'Resource temporarily unavailable' errors Error sending '3 LOGOUT' to IMAP: Resource temporarily unavailable at ./testimapattach.pl line 514 # --- END error Then I saw a bug in line 877: 877: if ( $temperrs++ > $self->{MaxTempErrors}||10 ) { The '>' takes precedence before '||' that's why the content of the if-block is ignored if $self->{MaxTempErrors} is undefined. Another bug is the case of "MaxTempErrors". According to line 183-185 of new constructor this should be "Maxtemperrors". 183: while (scalar(@_)) { 184: $self->{ucfirst(lc($_[0]))} = $_[1]; shift, shift; 185: } I have attached a patched. :-)
*** IMAPClient.pm.orig Fri May 11 01:50:12 2001 --- IMAPClient.pm Mon Jun 24 18:13:38 2002 *************** *** 874,880 **** $total ); if ($! =~ /Resource temporarily unavailable/i ) { ! if ( $temperrs++ > $self->{MaxTempErrors}||10 ) { $self->LastError("Persistent '${!}' errors\n"); $self->_debug("Persistent '${!}' errors\n"); return undef; --- 874,880 ---- $total ); if ($! =~ /Resource temporarily unavailable/i ) { ! if ( $temperrs++ > ($self->{Maxtemperrors}||10) ) { $self->LastError("Persistent '${!}' errors\n"); $self->_debug("Persistent '${!}' errors\n"); return undef;
From: David Kernen
[guest - Mon Jun 24 06:19:07 2002]: Show quoted text
> Distribution: Mail-IMAPClient-2.1.3 > Perl version: v5.6.1 built for i386-linux > OS: Linux 2.4.18-6mdksmp > > I got stumped on this error: > > # --- BEGIN error > Use of uninitialized value in numeric gt (>) at > /usr/lib/perl5/site_perl/5.6.1/Mail/IMAPClient.pm line 877. > Persistent 'Resource temporarily unavailable' errors > Couldn't append the message. at ./testimapattach.pl line 512. > Sending: 3 LOGOUT >
Thank you for this bug report. This bug was fixed. The latest version of Mail::IMAPClient is version 2.2.1. It contains the fix for this and several other bugs. Show quoted text
> Use of uninitialized value in numeric gt (>) at > /usr/lib/perl5/site_perl/5.6.1/Mail/IMAPClient.pm line 877. > Persistent 'Resource temporarily unavailable' errors > Error sending '3 LOGOUT' to IMAP: Resource temporarily unavailable at > ./testimapattach.pl line 514 > # --- END error > > > Then I saw a bug in line 877: > 877: if ( $temperrs++ > $self->{MaxTempErrors}||10 ) { > > The '>' takes precedence before '||' that's why the content of the > if-block is ignored if $self->{MaxTempErrors} is undefined. > > Another bug is the case of "MaxTempErrors". According to line 183-185 > of new constructor this should be "Maxtemperrors". > > 183: while (scalar(@_)) { > 184: $self->{ucfirst(lc($_[0]))} = $_[1]; shift, shift; > 185: } > > I have attached a patched. :-)