[Bps-public-commit] r15238 - in Net-IMAP-Server: lib/Net/IMAP/Server
alexmv at bestpractical.com
alexmv at bestpractical.com
Mon Aug 18 15:39:23 EDT 2008
Author: alexmv
Date: Mon Aug 18 15:38:40 2008
New Revision: 15238
Modified:
Net-IMAP-Server/ (props changed)
Net-IMAP-Server/lib/Net/IMAP/Server/Mailbox.pm
Log:
r36068 at kohr-ah: chmrr | 2008-08-16 21:05:04 -0400
* Remove Email::Folder dep, and the stub load_data which used it.
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 Mon Aug 18 15:38:40 2008
@@ -91,29 +91,12 @@
=head3 load_data
-This default mailbox implementation attempts to find a C<mbox> file
-whose name is based on the full path of the mailbox, and load messages
-from that file. It makes no attempt to write back any changes to the
-file.
-
+This default mailbox implementation simply returns an empty mailbox.
Subclasses will probably wish to override this method.
=cut
sub load_data {
- my $self = shift;
- my $name = $self->full_path;
- return unless $name;
- $name =~ s/\W+/_/g;
- $name .= ".mailbox";
- if ( -e $name ) {
- my $folder = Email::IMAPFolder->new( $name, eol => "\r\n" );
- my @messages = $folder->messages;
- warn "Loaded " . ( @messages + 0 ) . " messages from $name\n";
- $self->add_message($_) for @messages;
- } else {
- warn "No $name file\n";
- }
}
=head3 name
@@ -601,14 +584,4 @@
$self->parent(undef);
}
-package Email::IMAPFolder;
-use base 'Email::Folder';
-
-sub bless_message {
- my $self = shift;
- my $message = shift || "";
-
- return Net::IMAP::Server::Message->new($message);
-}
-
1;
More information about the Bps-public-commit
mailing list