MailFolder
view release on metacpan or search on metacpan
Mail/Folder.pm view on Meta::CPAN
=over 2
=item * Call the superclass C<update_message> method.
=item * Replace the specified message in the working copy of the folder.
=back
=cut
sub update_message {
my $self = shift;
my $key = shift;
my $mref = shift;
return 0 if (($self->foldername eq '') ||
!defined($self->{Messages}{$key}));
$self->invalidate_header($key);
$self->_update_content_length($mref) if $self->get_option('Content-Length');
$self->add_label($key, 'edited');
Mail/Folder/Emaul.pm view on Meta::CPAN
Replaces the message pointed to by C<$msg_number> with the contents of
the C<Mail::Internet> object reference C<$mref>.
Please note that, contrary to other documentation for B<Mail::Folder>,
the Emaul C<update_message> method actually updates the real folder,
rather than queueing it up for a subsequent sync. This will be fixed
soon.
=cut
sub update_message {
my $self = shift;
my $key = shift;
my $mref = shift;
my $dup_mref = $mref->dup;
$dup_mref->delete('From ');
return 0 unless $self->SUPER::update_message($key, $dup_mref);
Mail/Folder/Maildir.pm view on Meta::CPAN
Writes a temporary copy of the message in C<$mref> to the
folder C<tmp> directory, then moves that temporary copy into the
folder C<cur> directory, replacing the message pointed to by
C<$msg_number>.
It will delete the C<From_> line in the header if one is present.
=cut
sub update_message {
my $self = shift;
my $key = shift;
my $mref = shift;
my $folder = $self->foldername;
my $dup_mref = $mref->dup;
return 0 unless $self->SUPER::update_message($key, $dup_mref);
$dup_mref->delete('From ');
Mail/Folder/Mbox.pm view on Meta::CPAN
the C<Mail::Internet> object reference C<$mref>.
It will synthesize a 'From ' line if one is not present in
$mref.
If the 'Content-Length' option is not set, then C<get_message> will
escape 'From ' lines in the body of the message.
=cut
sub update_message {
my $self = shift;
my $key = shift;
my $mref = shift;
my $file_pos = 0;
my $filename = "$self->{MBOX_WorkingDir}/$key";
my $dup_mref = $mref->dup;
my $dup_href = $dup_mref->head->dup;
Mail/Folder/NNTP.pm view on Meta::CPAN
return 0;
}
=head2 update_message($msg_number, $mref)
Not currently implemented. Returns C<0>.
=cut
sub update_message {
my $self = shift;
my $key = shift;
my $mref = shift;
return 0;
}
=head2 is_valid_folder_format($foldername)
Returns C<1> if the foldername either starts with the string
( run in 0.489 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )