Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: jonathan.glatt [...] gmail.com
Cc:
AdminCc:

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

Attachments


Subject: select method not selecting other folders besides INBOX
Download (untitled) / with headers
text/plain 1.1k
I found this error in Net-IMAP-Simple-0.102 package. The select method won't select other folders beside INBOX. Here is my diff that got the code to work: *** Simple.pm Sat Jun 25 03:37:01 2005 --- Simple.pm.fixed Sat Jul 9 14:43:29 2005 *************** *** 201,211 **** sub select { my ( $self, $mbox ) = @_; ! $self->{working_box} = $mbox if $mbox; ! $mbox = 'INBOX'; ! ! $self->{working_box} ||= $mbox; if($self->{use_select_cache} && (time - $self->{BOXES}->{ $mbox }->{proc_time}) <= $self->{select_cache_ttl}){ return $self->{BOXES}->{$mbox}->{messages}; --- 201,209 ---- sub select { my ( $self, $mbox ) = @_; ! $mbox = 'INBOX' unless $mbox; ! $self->{working_box} = $mbox; if($self->{use_select_cache} && (time - $self->{BOXES}->{ $mbox }->{proc_time}) <= $self->{select_cache_ttl}){ return $self->{BOXES}->{$mbox}->{messages}; The original code statically sets $mbox to INBOX. Later in the code, the folder $mbox is selected. My modification sets $mbox to INBOX if $mbox isn't defined. The object attribute working_box is then set to the value of $mbox. Best wishes, Jonathan B. Glatt P.S. Thanks for writing this nice package.
Download Simple.pm.patch
text/x-diff 728b
*** Simple.pm Sat Jun 25 03:37:01 2005 --- Simple.pm.fixed Sat Jul 9 14:43:29 2005 *************** *** 201,211 **** sub select { my ( $self, $mbox ) = @_; ! $self->{working_box} = $mbox if $mbox; ! $mbox = 'INBOX'; ! ! $self->{working_box} ||= $mbox; if($self->{use_select_cache} && (time - $self->{BOXES}->{ $mbox }->{proc_time}) <= $self->{select_cache_ttl}){ return $self->{BOXES}->{$mbox}->{messages}; --- 201,209 ---- sub select { my ( $self, $mbox ) = @_; ! $mbox = 'INBOX' unless $mbox; ! $self->{working_box} = $mbox; if($self->{use_select_cache} && (time - $self->{BOXES}->{ $mbox }->{proc_time}) <= $self->{select_cache_ttl}){ return $self->{BOXES}->{$mbox}->{messages};


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.