[Bps-public-commit] Net-IMAP-Server branch, master, updated. 1.28-10-gbc66aea

Alex Vandiver alexmv at bestpractical.com
Mon Aug 2 10:45:30 EDT 2010


The branch, master has been updated
       via  bc66aeac7a19636266552ce981e3fe4e712810c8 (commit)
       via  968eec66bd673c76283e67864081e2b1c77f1b08 (commit)
       via  a3a0f5735af60e5e50fcba5250b569934e023366 (commit)
      from  278a9f50c293a374a940a17702dc093e175ee433 (commit)

Summary of changes:
 Changes                               |    8 ++++++++
 SIGNATURE                             |   20 ++++++++++----------
 lib/Net/IMAP/Server.pm                |    2 +-
 lib/Net/IMAP/Server/Command/Append.pm |    6 ++----
 lib/Net/IMAP/Server/Message.pm        |   18 +++++++++++-------
 5 files changed, 32 insertions(+), 22 deletions(-)

- Log -----------------------------------------------------------------
commit a3a0f5735af60e5e50fcba5250b569934e023366
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Sat Jul 31 02:15:58 2010 -0400

    Move all internaldate parsing to one location

diff --git a/lib/Net/IMAP/Server/Command/Append.pm b/lib/Net/IMAP/Server/Command/Append.pm
index 19d83a9..1ae96a6 100644
--- a/lib/Net/IMAP/Server/Command/Append.pm
+++ b/lib/Net/IMAP/Server/Command/Append.pm
@@ -36,10 +36,8 @@ sub run {
         }
         if (@options and grep {not ref $_} @options) {
             my ($time) = grep {not ref $_} @options;
-            my $parser = $msg->INTERNALDATE_PARSER;
-            my $dt = $parser->parse_datetime($time);
-            return $self->bad_command("Invalid date") unless $dt;
-            $msg->internaldate( $dt );
+            $msg->internaldate( $time )
+                or return $self->bad_command("Invalid date");
         }
 
         $self->connection->previous_exists( $self->connection->previous_exists + 1 )
diff --git a/lib/Net/IMAP/Server/Message.pm b/lib/Net/IMAP/Server/Message.pm
index 5d29a3d..0dfc533 100644
--- a/lib/Net/IMAP/Server/Message.pm
+++ b/lib/Net/IMAP/Server/Message.pm
@@ -78,16 +78,14 @@ sub internaldate {
     return $self->{internaldate} unless @_;
     my $value = shift;
 
-    if (ref $value) {
-        $self->{internaldate} = $value->strftime("%e-%b-%Y %T %z");
-    } else {
-        $self->{internaldate} = $value;
-        $value = $self->INTERNALDATE_PARSER->parse_datetime($value);
-    }
-    $value->truncate( to => "day" );
-    $value->set_time_zone( "floating" );
-    $value->set_time_zone( "UTC" );
-    $self->{epoch_day_utc} = $value->epoch;
+    my $dt = ref $value ? $value : $self->INTERNALDATE_PARSER->parse_datetime($value);
+    return undef unless $dt;
+
+    $self->{internaldate} = $dt->strftime("%e-%b-%Y %T %z");
+    $dt->truncate( to => "day" );
+    $dt->set_time_zone( "floating" );
+    $dt->set_time_zone( "UTC" );
+    $self->{epoch_day_utc} = $dt->epoch;
     return $self->{internaldate};
 }
 

commit 968eec66bd673c76283e67864081e2b1c77f1b08
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Sat Jul 31 02:21:21 2010 -0400

    Work around [rt.cpan.org #58459] by trimming leading space before parsing

diff --git a/lib/Net/IMAP/Server/Message.pm b/lib/Net/IMAP/Server/Message.pm
index 0dfc533..40fc2e2 100644
--- a/lib/Net/IMAP/Server/Message.pm
+++ b/lib/Net/IMAP/Server/Message.pm
@@ -78,7 +78,13 @@ sub internaldate {
     return $self->{internaldate} unless @_;
     my $value = shift;
 
-    my $dt = ref $value ? $value : $self->INTERNALDATE_PARSER->parse_datetime($value);
+    my $dt;
+    if (ref $value) {
+        $dt = $value;
+    } else {
+        $value =~ s/^\s+//;
+        $dt = $self->INTERNALDATE_PARSER->parse_datetime($value);
+    }
     return undef unless $dt;
 
     $self->{internaldate} = $dt->strftime("%e-%b-%Y %T %z");

commit bc66aeac7a19636266552ce981e3fe4e712810c8
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Aug 2 10:46:46 2010 -0400

    Version 1.29 releng

diff --git a/Changes b/Changes
index f54c092..b8d1b13 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,13 @@
 Revision history for Net-IMAP-Server
 
+1.29   Mon Aug  2 10:42:17 2010
+        * Fix "UID SEARCH 1,2"
+        * Allow "UID SEARCH *"
+        * A better fix for [rt.cpan.org #58160], which is caused by a
+          bug in DateTime::Format::Strptime ([rt.cpan.org #58459])
+        * Fix a minor bug in UID wherein unknown subcommands would
+          attempt to call a nonexistant method
+
 1.28   Tue Jun  8 14:14:17 2010
         * Prevent warnings when CLOSE is called
         * strftime("%e") can generate leading space, which
diff --git a/SIGNATURE b/SIGNATURE
index 414cd7b..84e6138 100644
--- a/SIGNATURE
+++ b/SIGNATURE
@@ -14,11 +14,11 @@ not run its Makefile.PL or Build.PL.
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 22b3ea36719748390203f73f74e2bfba62e74e83 Changes
+SHA1 db58f61a41777ce7dfd9617dcb0193666527a7a2 Changes
 SHA1 422032f0595e2e18fca67c2975c2c5f617d95569 MANIFEST
 SHA1 5f0e80c784d3815703e276c4abc0332410bf3aca META.yml
 SHA1 3028ae2462e9de33c1dbc19b787689d59baeda9d Makefile.PL
-SHA1 f4c6e4793fd7815aec4abfcd69018d8f34d832a8 README
+SHA1 f9a297a0f648993d82c44ca655dc507bc5d2bee7 README
 SHA1 f5333026061a6f347e7f2a3ce8bb6847081c200c certs/server-cert.pem
 SHA1 4b963cd4c2b0a7e073241b4bac727cb6f96276f8 certs/server-key.pem
 SHA1 49d9874a77ffba992404a926f33e77bb1f5b2629 ex/trivial-server.pl
@@ -30,9 +30,9 @@ SHA1 0384525d85d51e99532e3ad8729d870113646d14 inc/Module/Install/Makefile.pm
 SHA1 38c657de4d91f5a60ff8e6c6f6a5547daf7c4ab2 inc/Module/Install/Metadata.pm
 SHA1 5c25f1104c0038041e3b93e0660c39171e4caf2b inc/Module/Install/Win32.pm
 SHA1 94d47349c803c4bd2a9230d25e4db0b6aaf1acd8 inc/Module/Install/WriteAll.pm
-SHA1 9ee2e8fe7de9f7cf5ffa1a1de3fbc4b488dec1a0 lib/Net/IMAP/Server.pm
+SHA1 6bb3ffef61bbefa3b5267a59449bd09d70a57474 lib/Net/IMAP/Server.pm
 SHA1 297222972fd9ec4057d427153aa42e050cf0b77e lib/Net/IMAP/Server/Command.pm
-SHA1 14fe0f304abc29508e7871571bd0d3ac739479e6 lib/Net/IMAP/Server/Command/Append.pm
+SHA1 4528753566f748a9b5525fa51ae22d7cc9fdc6b3 lib/Net/IMAP/Server/Command/Append.pm
 SHA1 dd12c27c403385bbfddf52b37b4c9f7c15f0e7a4 lib/Net/IMAP/Server/Command/Authenticate.pm
 SHA1 70f2aeb901dde845183ef6b70f56b4d777641a5d lib/Net/IMAP/Server/Command/Capability.pm
 SHA1 de6607dec53f35b3b3fd41ad12191a83c59ae21b lib/Net/IMAP/Server/Command/Check.pm
@@ -51,27 +51,27 @@ SHA1 757faacdf957afddd0b0ff659258b8b0e09a0e4b lib/Net/IMAP/Server/Command/Lsub.p
 SHA1 9184f034fb9e0ba9c504bd0954f3e02283c61b18 lib/Net/IMAP/Server/Command/Namespace.pm
 SHA1 78902aa13c8e79d5abc95fc6de637c1af8783ce2 lib/Net/IMAP/Server/Command/Noop.pm
 SHA1 2e4ffb2680ca2b24e7ff85bcc806f9a2f437579a lib/Net/IMAP/Server/Command/Rename.pm
-SHA1 683821b21fc5b4a6c701b7769451516bb9ed205f lib/Net/IMAP/Server/Command/Search.pm
+SHA1 77b9f06b50e89b6b8a5fd1fc114d70a585a7d7ad lib/Net/IMAP/Server/Command/Search.pm
 SHA1 79cdc09edd573b6e168fc64bb957feb7cb3f0314 lib/Net/IMAP/Server/Command/Select.pm
 SHA1 ffe0dddf90fa8ff02815431e1e2a72ed3f85daf4 lib/Net/IMAP/Server/Command/Starttls.pm
 SHA1 46d29fc4c67ee0e90ddf0a8d018bb8d1545856ed lib/Net/IMAP/Server/Command/Status.pm
 SHA1 bd5fe7da9d541a86d5ae0072e85b1392196227f2 lib/Net/IMAP/Server/Command/Store.pm
 SHA1 3fbb8ce46e696eeb62a97264cb564924a7ccfb57 lib/Net/IMAP/Server/Command/Subscribe.pm
-SHA1 fe08fab9418f3dd62cbc0973c228b3c9b4687ef3 lib/Net/IMAP/Server/Command/Uid.pm
+SHA1 ec8da329de0da4a79e83ceea3bb189992dc287a5 lib/Net/IMAP/Server/Command/Uid.pm
 SHA1 4591be8d501ea8877f3b4d4418620cce094256ab lib/Net/IMAP/Server/Command/Unsubscribe.pm
 SHA1 43df000e769f9737548d12cb350f18741990622e lib/Net/IMAP/Server/Connection.pm
 SHA1 716c1bb33a3b970dfc80b2d19366b719a48caef3 lib/Net/IMAP/Server/DefaultAuth.pm
 SHA1 9c919510040feb6aa7c482d72611a663cb609db6 lib/Net/IMAP/Server/DefaultModel.pm
 SHA1 688651b7e624fe1d4bf29e320b05d0872fb54dd0 lib/Net/IMAP/Server/Error.pm
 SHA1 686d0e65b737ebdbab4ce2db0c0fb64ba88f1c55 lib/Net/IMAP/Server/Mailbox.pm
-SHA1 6d6f4a85e0e292d797f4209751c7608763514b91 lib/Net/IMAP/Server/Message.pm
+SHA1 3129922ae0a84fc49e8ada33bcec7a9789f77464 lib/Net/IMAP/Server/Message.pm
 SHA1 2e67e318edc490da7367ebcc789d35d0810e00e6 t/00.load.t
 SHA1 ec035a09e3f370620874e9c706d6c8ae4bdfa6a1 t/pod-coverage.t
 SHA1 0190346d7072d458c8a10a45c19f86db641dcc48 t/pod.t
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
-iEYEARECAAYFAkwOiVAACgkQMflWJZZAbqCg+wCfXYq8uDa+FXsjmaPGYWS4ex8O
-ZssAnAs//4Gt/4CXQNoaIHq6x7YXKc+u
-=AIHt
+iEYEARECAAYFAkxW2iMACgkQMflWJZZAbqAQqwCfWS1vq0Le18lpd6uvF3piSdkB
+4WIAoIcwQE5gSkYNfmfKUBkmesSX6qJy
+=u/6a
 -----END PGP SIGNATURE-----
diff --git a/lib/Net/IMAP/Server.pm b/lib/Net/IMAP/Server.pm
index 4d1db52..576a3f3 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.28';
+our $VERSION = '1.29';
 
 =head1 NAME
 

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



More information about the Bps-public-commit mailing list