NAME
Mail::Message::Head::Subset - subset of header information of a message
CLASS INHERITANCE
Mail::Message::Head::Subset realizes a Mail::Message::Head::Complete which is a Mail::Message::Head 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
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).
METHODS
Initiation
- build FIELDS
-
See Mail::Message::Head::build()
- new OPTIONS
-
OPTION DEFAULT field_type 'Mail::Message::Field::Fast' log 'WARNINGS' message undef modified <false> trace 'WARNINGS'
The Header
- clone [FIELDS]
-
See Mail::Message::Head::Complete::clone()
- isDelayed
-
See Mail::Message::Head::isDelayed()
- isEmpty
-
See Mail::Message::Head::isEmpty()
- isMultipart
-
See Mail::Message::Head::isMultipart()
- message [MESSAGE]
-
See Mail::Message::Head::message()
- modified [BOOLEAN]
-
See Mail::Message::Head::modified()
Constructing a Header
- add FIELD | LINE | (NAME,BODY[,ATTRS])
-
See Mail::Message::Head::Complete::add()
- delete NAME
-
See Mail::Message::Head::Complete::delete()
- removeField FIELD
-
See Mail::Message::Head::Complete::removeField()
- reset NAME, FIELDS
-
See Mail::Message::Head::Complete::reset()
- set FIELD | LINE | (NAME, BODY [,ATTRS])
-
See Mail::Message::Head::Complete::set()
Access to the Header
- addResentGroup RESENT-GROUP|DATA
-
See Mail::Message::Head::Complete::addResentGroup()
- count NAME
-
Count the number of fields with this NAME. If the NAME cannot be found, the full header get loaded. In case we find any NAME field, it is decided we know all of them, and loading is not needed.
- get NAME [,INDEX]
-
See Mail::Message::Head::get()
- grepNames [NAMES|ARRAY-OF-NAMES|REGEXS]
-
See Mail::Message::Head::Complete::grepNames()
- guessBodySize
-
The body size is defined in the
Content-Length
field. However, this field may not be known. In that case, a guess is made based on the knownLines
field. When also that field is not known yet,undef
is returned. - guessTimeStamp
-
See Mail::Message::Head::Complete::guessTimeStamp()
- knownNames
-
See Mail::Message::Head::knownNames()
- names
-
See Mail::Message::Head::Complete::names()
- nrLines
-
See Mail::Message::Head::Complete::nrLines()
- print [FILEHANDLE]
-
See Mail::Message::Head::Complete::print()
- printUndisclosed [FILEHANDLE]
-
See Mail::Message::Head::Complete::printUndisclosed()
- resentGroups
-
See Mail::Message::Head::Complete::resentGroups()
- size
-
See Mail::Message::Head::Complete::size()
- timestamp
-
See Mail::Message::Head::Complete::timestamp()
- toString
-
See Mail::Message::Head::Complete::toString()
Reading and Writing [internals]
- addNoRealize FIELD
-
See Mail::Message::Head::addNoRealize()
- addOrderedFields FIELDS
-
See Mail::Message::Head::addOrderedFields()
- createFromLine
-
See Mail::Message::Head::Complete::createFromLine()
- createMessageId
-
See Mail::Message::Head::Complete::createMessageId()
- fileLocation
-
See Mail::Message::Head::fileLocation()
- load
-
See Mail::Message::Head::load()
- messagIdPrefix [STRING]
-
See Mail::Message::Head::Complete::messagIdPrefix()
- moveLocation DISTANCE
-
See Mail::Message::Head::moveLocation()
- orderedFields
-
See Mail::Message::Head::orderedFields()
- read PARSER
-
See Mail::Message::Head::read()
- setNoRealize FIELD
-
See Mail::Message::Head::setNoRealize()
Logging and Tracing
- defaultTrace [LEVEL, [LEVEL]
-
See Mail::Reporter::defaultTrace()
- errors
-
See Mail::Reporter::errors()
- log [LEVEL [,STRINGS]]
-
See Mail::Reporter::log()
- report [LEVEL]
-
See Mail::Reporter::report()
- reportAll [LEVEL]
-
See Mail::Reporter::reportAll()
- trace [LEVEL]
-
See Mail::Reporter::trace()
- warnings
-
See Mail::Reporter::warnings()
Other Methods
- AUTOLOAD
-
See Mail::Reporter::AUTOLOAD()
- DESTROY
-
See Mail::Reporter::DESTROY()
- inGlobalDestruction
-
See Mail::Reporter::inGlobalDestruction()
- logPriority LEVEL
-
See Mail::Reporter::logPriority()
- logSettings
-
See Mail::Reporter::logSettings()
- notImplemented
-
See Mail::Reporter::notImplemented()
SEE ALSO
A good start to read is Mail::Box-Overview. More documentation and a mailinglist are available from the project's website at http://perl.overmeer.net/mailbox/.
AUTHOR
Mark Overmeer (mark@overmeer.net) with the help of many.
VERSION
This code is beta, version 2.025.
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.