[Bps-public-commit] Net-IMAP-Server branch, master, updated. 1.19-4-gceb130c

Alex M Vandiver alexmv at bestpractical.com
Fri Jun 19 16:06:47 EDT 2009


The branch, master has been updated
       via  ceb130c858608347e2327475424c2d229fb4439e (commit)
       via  9b498eb8f45446d500e683ce5991d77a9910b6d9 (commit)
       via  9ed4903a03a50c0c142c1a1b34e1ccdfd858415f (commit)
       via  31c79c74cf6c2597d92adde9216c14398edaf65c (commit)
      from  faba2bc237445f6aff6035a4881874978d28e150 (commit)

Summary of changes:
 Changes                        |    7 +++-
 META.yml                       |    2 +-
 SIGNATURE                      |   14 +++---
 lib/Net/IMAP/Server.pm         |    2 +-
 lib/Net/IMAP/Server/Mailbox.pm |   87 ++++++++++++++++++++++++++-------------
 5 files changed, 73 insertions(+), 39 deletions(-)

- Log -----------------------------------------------------------------
commit 31c79c74cf6c2597d92adde9216c14398edaf65c
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Fri Jun 19 15:07:13 2009 -0400

    Fix the logic of the ->unseen method -- it was backwards.
    
    Spotted by Paul Miller <jettero at cpan.org>

diff --git a/lib/Net/IMAP/Server/Mailbox.pm b/lib/Net/IMAP/Server/Mailbox.pm
index afe4f6d..0e83eae 100644
--- a/lib/Net/IMAP/Server/Mailbox.pm
+++ b/lib/Net/IMAP/Server/Mailbox.pm
@@ -482,13 +482,13 @@ sub first_unseen {
 
 =head3 unseen
 
-Returns the number of messages which have the C<\Seen> flag set.
+Returns the number of messages which do not have the C<\Seen> flag set.
 
 =cut
 
 sub unseen {
     my $self = shift;
-    return scalar grep { $_->has_flag('\Seen') } @{ $self->messages };
+    return scalar grep { not $_->has_flag('\Seen') } @{ $self->messages };
 }
 
 =head3 permanentflags

commit 9ed4903a03a50c0c142c1a1b34e1ccdfd858415f
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Fri Jun 19 15:08:22 2009 -0400

    Add documentation for ->status method

diff --git a/lib/Net/IMAP/Server/Mailbox.pm b/lib/Net/IMAP/Server/Mailbox.pm
index 0e83eae..cc14d3b 100644
--- a/lib/Net/IMAP/Server/Mailbox.pm
+++ b/lib/Net/IMAP/Server/Mailbox.pm
@@ -326,7 +326,35 @@ sub append {
     return $m;
 }
 
-=head3 status
+=head3 status TYPES
+
+Called when the clients requests a status update (via
+L<Net::IMAP::Server::Command::Status>).  C<TYPES> should be the types
+of information requested, chosen from this list:
+
+=over
+
+=item MESSAGES
+
+The number of messages in the mailbox (via L</exists>)
+
+=item RECENT
+
+The number of messages marked as C<\Recent> (via L</recent>)
+
+=item UNSEEN
+
+The number of messages not marked as C<\Seen> (via L</unseen>)
+
+=item UIDVALIDITY
+
+The C</uidvalidity> of the mailbox.
+
+=item UIDNEXT
+
+The C</uidnext> of the mailbox.
+
+=back
 
 =cut
 

commit 9b498eb8f45446d500e683ce5991d77a9910b6d9
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Fri Jun 19 15:09:45 2009 -0400

    Move ->status method to a more sensible place in the code; no actual code changes

diff --git a/lib/Net/IMAP/Server/Mailbox.pm b/lib/Net/IMAP/Server/Mailbox.pm
index cc14d3b..28bd8e4 100644
--- a/lib/Net/IMAP/Server/Mailbox.pm
+++ b/lib/Net/IMAP/Server/Mailbox.pm
@@ -326,61 +326,6 @@ sub append {
     return $m;
 }
 
-=head3 status TYPES
-
-Called when the clients requests a status update (via
-L<Net::IMAP::Server::Command::Status>).  C<TYPES> should be the types
-of information requested, chosen from this list:
-
-=over
-
-=item MESSAGES
-
-The number of messages in the mailbox (via L</exists>)
-
-=item RECENT
-
-The number of messages marked as C<\Recent> (via L</recent>)
-
-=item UNSEEN
-
-The number of messages not marked as C<\Seen> (via L</unseen>)
-
-=item UIDVALIDITY
-
-The C</uidvalidity> of the mailbox.
-
-=item UIDNEXT
-
-The C</uidnext> of the mailbox.
-
-=back
-
-=cut
-
-sub status {
-    my $self = shift;
-    my (@keys) = @_;
-    $self->poll;
-    my %items;
-    for my $i ( @keys ) {
-        if ( $i eq "MESSAGES" ) {
-            $items{$i} = $self->exists;
-        } elsif ( $i eq "RECENT" ) {
-            $items{$i} = $self->recent;
-        } elsif ( $i eq "UNSEEN" ) {
-            $items{$i} = $self->unseen;
-        } elsif ( $i eq "UIDVALIDITY" ) {
-            my $uidvalidity = $self->uidvalidity;
-            $items{$i} = $uidvalidity if defined $uidvalidity;
-        } elsif ( $i eq "UIDNEXT" ) {
-            my $uidnext = $self->uidnext;
-            $items{$i} = $uidnext if defined $uidnext;
-        }
-    }
-    return %items;
-}
-
 =head3 close
 
 Called when the client selects a different mailbox, or when the
@@ -531,6 +476,62 @@ sub permanentflags {
     return $self->flags;
 }
 
+
+=head3 status TYPES
+
+Called when the clients requests a status update (via
+L<Net::IMAP::Server::Command::Status>).  C<TYPES> should be the types
+of information requested, chosen from this list:
+
+=over
+
+=item MESSAGES
+
+The number of messages in the mailbox (via L</exists>)
+
+=item RECENT
+
+The number of messages marked as C<\Recent> (via L</recent>)
+
+=item UNSEEN
+
+The number of messages not marked as C<\Seen> (via L</unseen>)
+
+=item UIDVALIDITY
+
+The C</uidvalidity> of the mailbox.
+
+=item UIDNEXT
+
+The C</uidnext> of the mailbox.
+
+=back
+
+=cut
+
+sub status {
+    my $self = shift;
+    my (@keys) = @_;
+    $self->poll;
+    my %items;
+    for my $i ( @keys ) {
+        if ( $i eq "MESSAGES" ) {
+            $items{$i} = $self->exists;
+        } elsif ( $i eq "RECENT" ) {
+            $items{$i} = $self->recent;
+        } elsif ( $i eq "UNSEEN" ) {
+            $items{$i} = $self->unseen;
+        } elsif ( $i eq "UIDVALIDITY" ) {
+            my $uidvalidity = $self->uidvalidity;
+            $items{$i} = $uidvalidity if defined $uidvalidity;
+        } elsif ( $i eq "UIDNEXT" ) {
+            my $uidnext = $self->uidnext;
+            $items{$i} = $uidnext if defined $uidnext;
+        }
+    }
+    return %items;
+}
+
 =head3 read_only
 
 Returns true if this mailbox is read-only.  By default, the value of

commit ceb130c858608347e2327475424c2d229fb4439e
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Fri Jun 19 16:06:19 2009 -0400

    1.20 releng

diff --git a/Changes b/Changes
index f6c34ef..65c9025 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,11 @@
 Revision history for Net-IMAP-Server
 
-1.19   Fri Jun 19 15:26:17 2009
+1.20   Fri Jun 19 16:04:17 2009
+        * The logic for STATUS UNSEEN was backwards, counting the
+          number of seen messages.  Reported by Paul Miller
+          <jettero at cpan.org>
+
+1.19   Fri Jun 19 13:26:17 2009
         * Fix POD coverage on Net::IMAP::Server::Error
 
 1.18   Wed Jun 17 14:50:16 2009
diff --git a/META.yml b/META.yml
index 65565a4..eebc1b5 100644
--- a/META.yml
+++ b/META.yml
@@ -35,4 +35,4 @@ requires:
   UNIVERSAL::require: 0
 resources:
   license: http://dev.perl.org/licenses/
-version: 1.19
+version: 1.20
diff --git a/SIGNATURE b/SIGNATURE
index 76b38bc..dc7a137 100644
--- a/SIGNATURE
+++ b/SIGNATURE
@@ -14,9 +14,9 @@ not run its Makefile.PL or Build.PL.
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 5cdbbc8bfaa7fc19c34c2eb72b6e9b93734f4905 Changes
+SHA1 ed3d49529a45a51146826450e55fc4ba905be293 Changes
 SHA1 422032f0595e2e18fca67c2975c2c5f617d95569 MANIFEST
-SHA1 75fc49833aa06c7a85f919a8b613bd870595a201 META.yml
+SHA1 1219b8a6818fb4c9cedc8ba03b5812e77cee155d META.yml
 SHA1 ccec6cf043c8037dddd9067027ebe3def097d9e4 Makefile.PL
 SHA1 f4c6e4793fd7815aec4abfcd69018d8f34d832a8 README
 SHA1 f5333026061a6f347e7f2a3ce8bb6847081c200c certs/server-cert.pem
@@ -30,7 +30,7 @@ SHA1 c45b2672d8ae49d710343f39f68d00c28cba4b43 inc/Module/Install/Makefile.pm
 SHA1 82e172b951d97f74315af04cb7b909afa546fc07 inc/Module/Install/Metadata.pm
 SHA1 1b1de77b3187dfbbd6de905e539ff1393c1aa6a0 inc/Module/Install/Win32.pm
 SHA1 c1c96fa424457d79caaaf9af61037e6f984e71dc inc/Module/Install/WriteAll.pm
-SHA1 0dcfa5fac18c1874e0a435077796bfec5ebb3ac0 lib/Net/IMAP/Server.pm
+SHA1 c08159ddc84d6ba66818601a924c7b538589917d lib/Net/IMAP/Server.pm
 SHA1 e0016d978a1d896866cf27494ae9651d8af50311 lib/Net/IMAP/Server/Command.pm
 SHA1 636e390f8f44ee6c51321220a44c20ceba08b44d lib/Net/IMAP/Server/Command/Append.pm
 SHA1 5c203d47099444ceb8ce9e8927353d91ba0545cd lib/Net/IMAP/Server/Command/Authenticate.pm
@@ -63,7 +63,7 @@ SHA1 b1a668c6b5cd61e4a0390123cb9c711a3b456b10 lib/Net/IMAP/Server/Connection.pm
 SHA1 716c1bb33a3b970dfc80b2d19366b719a48caef3 lib/Net/IMAP/Server/DefaultAuth.pm
 SHA1 9eea45b97044ad2d07db6b8959c6e41d60c550d5 lib/Net/IMAP/Server/DefaultModel.pm
 SHA1 688651b7e624fe1d4bf29e320b05d0872fb54dd0 lib/Net/IMAP/Server/Error.pm
-SHA1 92668acf271c99421140fe8684a91c2415a779b5 lib/Net/IMAP/Server/Mailbox.pm
+SHA1 21467b454261007744d61d63d0598c96ac8e1336 lib/Net/IMAP/Server/Mailbox.pm
 SHA1 304b0d74141a70537b8c847acac806e18a966757 lib/Net/IMAP/Server/Message.pm
 SHA1 2e67e318edc490da7367ebcc789d35d0810e00e6 t/00.load.t
 SHA1 ec035a09e3f370620874e9c706d6c8ae4bdfa6a1 t/pod-coverage.t
@@ -71,7 +71,7 @@ SHA1 0190346d7072d458c8a10a45c19f86db641dcc48 t/pod.t
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.11 (GNU/Linux)
 
-iEYEARECAAYFAko7yl8ACgkQMflWJZZAbqDeQgCfcRfV3w2RyBVNTqL2GbQC0b2E
-2GAAn3W1S482H0rTENmaS165TQvhHRFt
-=N7f1
+iEQEARECAAYFAko776oACgkQMflWJZZAbqDHuACQvci1wQLrhkUwBSMArHx1XcVB
+AJ95enE+7VnPJGkRLe8JgCQ3DbnzSg==
+=P5Ph
 -----END PGP SIGNATURE-----
diff --git a/lib/Net/IMAP/Server.pm b/lib/Net/IMAP/Server.pm
index 0fe2b63..e6c666e 100644
--- a/lib/Net/IMAP/Server.pm
+++ b/lib/Net/IMAP/Server.pm
@@ -8,7 +8,7 @@ use base qw/Net::Server::Coro Class::Accessor/;
 use UNIVERSAL::require;
 use Coro;
 
-our $VERSION = '1.19';
+our $VERSION = '1.20';
 
 =head1 NAME
 

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list