Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: jettero [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: (no value)
Fixed in: (no value)



Subject: ->unseen() patch
Download (untitled) / with headers
text/plain 183b
I wished to have a method that would return the number of "unseen" messages -- a number reported by the select and nop queries and was automatically stored in the $self object anyway.
Subject: unseen.patch
Download unseen.patch
text/x-diff 689b
--- /usr/local/share/perl/5.8.8/Net/IMAP/Simple.pm 2008-01-30 21:57:12.000000000 -0500 +++ ./Simple.pm 2008-02-02 08:13:26.000000000 -0500 @@ -311,6 +311,25 @@ return $self->{BOXES}->{ $self->current_box }->{recent}; } +=pod + +=item unseen + + print "Unseen messages value: " . $imap->unseen . "\n"; + +This method accepts an optional folder name and returns the 'UNSEEN' value provided durning a SELECT result set. If no folder name is provided the last folder $imap->select'ed will be used. + +This method uses caching. + +=cut + +sub unseen { + my ($self, $folder) = @_; + + $self->select($folder); + return $self->{BOXES}{ $self->current_box }{oflags}{UNSEEN}; +} + =pod
Download (untitled) / with headers
text/plain 193b
This was one of the patches I included in the 1.18 release -- If riding in an airplane is flying, then riding in a boat is swimming. 107 jumps, 43.5 minutes of freefall, 83.4 freefall miles.


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.