Message::Head::Subset(3)

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
Methods prefixed with an abbreviation are described in Mail::Reporter (MR), Mail::Message::Head (MMH), Mail::Message::Head::Complete (MMHC).

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

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

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 fileLocation                      MR notImplemented
  MMH grepNames [NAMES|ARRAY-OF-N...   MMH read PARSER
  MMH guessBodySize                        setNoRealize FIELD
  MMH guessTimestamp                   MMH wrapLength [CHARS]

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

For support and additional documentation, see http://perl.overmeer.net/mailbox/

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.018.

Copyright (c) 2001-2002 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.