NAME

Mail::Message::Head::Subset - subset of header information of a message

CLASS HIERARCHY

Mail::Message::Head::Subset realizes Mail::Message::Head::Complete
is a Mail::Message::Head             is a Mail::Message::Head
is a Mail::Reporter                  is a Mail::Reporter

SYNOPSIS

my Mail::Message::Head::Subset $subset = ...;
$subset->isa('Mail::Message::Head')  # true
$subset->guessBodySize               # integer or undef
$subset->isDelayed                   # true

DESCRIPTION

Read Mail::Message::Head, Mail::Message, and Mail::Box-Overview first.

Some types of folders contain an index file which lists a few lines of information per messages. Especially when it is costly to read header lines, the index speeds-up access considerably. For instance, the subjects of all messages are often wanted, but waiting for a thousand messages of the folder to be read may imply a thousand network reads (IMAP) or file openings (MH)

When you access header fields which are not in the header subset, the whole header has to be parsed (which may consume considerable time, depending on the type of folder).

METHOD INDEX

The general methods for Mail::Message::Head::Subset objects:

MMH add ...                              new OPTIONS
MMH build FIELDS                     MMH nrLines
    count NAME                       MMH print FILEHANDLE
 MR errors                           MMH printUndisclosed FILEHANDLE
    get NAME [,INDEX]                 MR report [LEVEL]
MMH isDelayed                         MR reportAll [LEVEL]
MMH isMultipart                      MMH reset NAME, FIELDS
MMH isResent                         MMH set ...
MMH knownNames                       MMH size
 MR log [LEVEL [,STRINGS]]           MMH timestamp
MMH modified [BOOL]                  MMH toString
MMH names                             MR trace [LEVEL]

The extra methods for extension writers:

 MR AUTOLOAD                          MR inGlobalDestruction
 MR DESTROY                          MMH load
MMH addNoRealize FIELD                MR logPriority LEVEL
MMH clone [FIELDS]                    MR logSettings
MMH createFromLine                   MMH message [MESSAGE]
MMH createMessageId                  MMH moveLocation DISTANCE
MMH createStatus LABEL                MR notImplemented
MMH fileLocation                     MMH read PARSER
MMH grepNames [NAMES|ARRAY-OF-N...       setNoRealize FIELD
MMH guessBodySize                    MMH statusLabels
MMH guessTimestamp                   MMH wrapLength [CHARS]

Methods prefixed with an abbreviation are described in the following manual-pages:

  MR = L<Mail::Reporter>
 MMH = L<Mail::Message::Head>
MMHC = L<Mail::Message::Head::Complete>

METHODS

new OPTIONS
OPTION         DEFINED BY           DEFAULT
complete_type  Mail::Message::Head  'Mail::Message::Head::Complete'
field_type     Mail::Message::Head  'Mail::Message::Field::Fast'
log            Mail::Reporter       'WARNINGS'
message        Mail::Message::Head  undef
modified       Mail::Message::Head  0
trace          Mail::Reporter       'WARNINGS'
wrap_length    Mail::Message::Head  72

No options specific to a Mail::Message::Head::Subset

get NAME [,INDEX]

Get the value(s) of the field with NAME, or only the one value on the specified INDEX. If the field with the specified name is not (yet) known, the full header will be loaded first.

See Mail::Message::Head for more details.

count NAME

Count the number of appearances of the field with the specified NAME in the header. If the name is not (yet) known, the header will be loaded first.

METHODS for extension writers

setNoRealize FIELD

Set a field, but avoid the loading of the partial header. This method does not test the validity of the argument, nor flag the header as changed.

SEE ALSO

Mail::Box-Overview

AUTHOR

Mark Overmeer (mailbox@overmeer.net). All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

VERSION

This code is beta, version 2.003.

Copyright (c) 2001 Mark Overmeer. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.