[Bps-public-commit] r9325 - in Net-Server-IMAP: lib/Net/Server/IMAP lib/Net/Server/IMAP/Command

alexmv at bestpractical.com alexmv at bestpractical.com
Tue Oct 16 12:39:18 EDT 2007


Author: alexmv
Date: Tue Oct 16 12:39:18 2007
New Revision: 9325

Modified:
   Net-Server-IMAP/   (props changed)
   Net-Server-IMAP/lib/Net/Server/IMAP/Command/Check.pm
   Net-Server-IMAP/lib/Net/Server/IMAP/Command/Noop.pm
   Net-Server-IMAP/lib/Net/Server/IMAP/Mailbox.pm

Log:
 r23672 at zoq-fot-pik:  chmrr | 2007-10-16 12:38:49 -0400
  * Add a ->poll callback to mailboxes


Modified: Net-Server-IMAP/lib/Net/Server/IMAP/Command/Check.pm
==============================================================================
--- Net-Server-IMAP/lib/Net/Server/IMAP/Command/Check.pm	(original)
+++ Net-Server-IMAP/lib/Net/Server/IMAP/Command/Check.pm	Tue Oct 16 12:39:18 2007
@@ -8,6 +8,10 @@
 sub validate {
     my $self = shift;
 
+    return $self->bad_command("Login first") if $self->connection->is_unauth;
+    return $self->bad_command("Select a mailbox first")
+        unless $self->connection->is_selected;
+
     my @options = $self->parsed_options;
     return $self->bad_command("Too many options") if @options;
 
@@ -17,6 +21,8 @@
 sub run {
     my $self = shift;
 
+    $self->connection->selected->poll if $self->connection->is_auth and $self->connection->is_selected;
+
     $self->ok_completed();
 }
 

Modified: Net-Server-IMAP/lib/Net/Server/IMAP/Command/Noop.pm
==============================================================================
--- Net-Server-IMAP/lib/Net/Server/IMAP/Command/Noop.pm	(original)
+++ Net-Server-IMAP/lib/Net/Server/IMAP/Command/Noop.pm	Tue Oct 16 12:39:18 2007
@@ -17,6 +17,8 @@
 sub run {
     my $self = shift;
 
+    $self->connection->selected->poll if $self->connection->is_auth and $self->connection->is_selected;
+
     $self->ok_completed();
 }
 

Modified: Net-Server-IMAP/lib/Net/Server/IMAP/Mailbox.pm
==============================================================================
--- Net-Server-IMAP/lib/Net/Server/IMAP/Mailbox.pm	(original)
+++ Net-Server-IMAP/lib/Net/Server/IMAP/Mailbox.pm	Tue Oct 16 12:39:18 2007
@@ -161,6 +161,9 @@
     return @ids;
 }
 
+sub poll {
+}
+
 package Email::IMAPFolder;
 use base 'Email::Folder';
 use YAML;



More information about the Bps-public-commit mailing list