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

alexmv at bestpractical.com alexmv at bestpractical.com
Wed Aug 6 18:45:00 EDT 2008


Author: alexmv
Date: Wed Aug  6 18:44:59 2008
New Revision: 14872

Modified:
   Net-IMAP-Server/   (props changed)
   Net-IMAP-Server/lib/Net/IMAP/Server.pm
   Net-IMAP-Server/lib/Net/IMAP/Server/DefaultModel.pm
   Net-IMAP-Server/lib/Net/IMAP/Server/Mailbox.pm

Log:
 r35442 at kohr-ah:  chmrr | 2008-08-06 18:43:37 -0400
  * We can intuit is_inbox; don't make people set it explicitly


Modified: Net-IMAP-Server/lib/Net/IMAP/Server.pm
==============================================================================
--- Net-IMAP-Server/lib/Net/IMAP/Server.pm	(original)
+++ Net-IMAP-Server/lib/Net/IMAP/Server.pm	Wed Aug  6 18:44:59 2008
@@ -8,7 +8,7 @@
 use UNIVERSAL::require;
 use Coro;
 
-our $VERSION = '0.9';
+our $VERSION = '0.95';
 
 =head1 NAME
 

Modified: Net-IMAP-Server/lib/Net/IMAP/Server/DefaultModel.pm
==============================================================================
--- Net-IMAP-Server/lib/Net/IMAP/Server/DefaultModel.pm	(original)
+++ Net-IMAP-Server/lib/Net/IMAP/Server/DefaultModel.pm	Wed Aug  6 18:44:59 2008
@@ -44,8 +44,7 @@
 should override this methtod to inspect the L</auth> object, and
 determine what folders the user should have.  The primary purpose of
 this method is to set L</root> to the top level of the mailbox tree.
-The root is expected to contain a mailbox named C<INBOX>, which should
-have L<Net::IMAP::Server::Mailbox/is_inbox> set.
+The root is expected to contain a mailbox named C<INBOX>.
 
 =cut
 
@@ -57,7 +56,7 @@
         $self->root( $roots{$user} );
     } else {
         $self->root( Net::IMAP::Server::Mailbox->new() )
-            ->add_child( name => "INBOX", is_inbox => 1 )
+            ->add_child( name => "INBOX" )
             ->add_child( name => $user );
         $roots{$user} = $self->root;
     }

Modified: Net-IMAP-Server/lib/Net/IMAP/Server/Mailbox.pm
==============================================================================
--- Net-IMAP-Server/lib/Net/IMAP/Server/Mailbox.pm	(original)
+++ Net-IMAP-Server/lib/Net/IMAP/Server/Mailbox.pm	Wed Aug  6 18:44:59 2008
@@ -38,6 +38,10 @@
         if $self->parent
         and grep { $self->full_path eq $_->full_path }
         @{ $self->parent->children };
+    $self->is_inbox(1)
+        if $self->parent
+        and not $self->parent->parent
+        and $self->name =~ /^inbox$/i;
     $self->init;
     $self->load_data;
     return $self;



More information about the Bps-public-commit mailing list