
=head1 NAME

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


=head1 INHERITANCE

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

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


=head1 SYNOPSIS

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


=head1 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).


=head1 OVERLOADED


overload: B<"">

=over 4

See L<Mail::Message::Head/"OVERLOADED">

=back

overload: B<bool>

=over 4

See L<Mail::Message::Head/"OVERLOADED">

=back


=head1 METHODS


=head2 Constructors


$obj-E<gt>B<build>([PAIR|FIELD]-LIST)

=over 4

See L<Mail::Message::Head/"Constructors">

=back

Mail::Message::Head::Subset-E<gt>B<new>(OPTIONS)

=over 4

See L<Mail::Message::Head/"Constructors">

=back

=head2 The header


$obj-E<gt>B<isDelayed>

=over 4

See L<Mail::Message::Head/"The header">

=back

$obj-E<gt>B<isEmpty>

=over 4

See L<Mail::Message::Head/"The header">

=back

$obj-E<gt>B<isModified>

=over 4

See L<Mail::Message::Head/"The header">

=back

$obj-E<gt>B<knownNames>

=over 4

See L<Mail::Message::Head/"The header">

=back

$obj-E<gt>B<message>([MESSAGE])

=over 4

See L<Mail::Message::Head/"The header">

=back

$obj-E<gt>B<modified>([BOOLEAN])

=over 4

See L<Mail::Message::Head/"The header">

=back

$obj-E<gt>B<orderedFields>

=over 4

See L<Mail::Message::Head/"The header">

=back

=head2 Access to the header


$obj-E<gt>B<count>(NAME)

=over 4

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.

=back

$obj-E<gt>B<get>(NAME [,INDEX])

=over 4

Get the data which is related to the field with the NAME.  The case of the
characters in NAME does not matter.  When a NAME is used which is not known
yet, realization will take place.

=back

$obj-E<gt>B<study>(NAME [,INDEX])

=over 4

See L<Mail::Message::Head/"Access to the header">

=back

=head2 About the body


$obj-E<gt>B<guessBodySize>

=over 4

The body size is defined in the C<Content-Length> field.  However, this
field may not be known.  In that case, a guess is made based on the known
C<Lines> field.  When also that field is not known yet, C<undef> is returned.

=back

$obj-E<gt>B<isMultipart>

=over 4

See L<Mail::Message::Head/"About the body">

=back

=head2 Internals


$obj-E<gt>B<addNoRealize>(FIELD)

=over 4

See L<Mail::Message::Head/"Internals">

=back

$obj-E<gt>B<addOrderedFields>(FIELDS)

=over 4

See L<Mail::Message::Head/"Internals">

=back

$obj-E<gt>B<fileLocation>

=over 4

See L<Mail::Message::Head/"Internals">

=back

$obj-E<gt>B<load>

=over 4

See L<Mail::Message::Head/"Internals">

=back

$obj-E<gt>B<moveLocation>(DISTANCE)

=over 4

See L<Mail::Message::Head/"Internals">

=back

$obj-E<gt>B<read>(PARSER)

=over 4

See L<Mail::Message::Head/"Internals">

=back

$obj-E<gt>B<setNoRealize>(FIELD)

=over 4

See L<Mail::Message::Head/"Internals">

=back

=head2 Error handling


$obj-E<gt>B<AUTOLOAD>

=over 4

See L<Mail::Reporter/"Error handling">

=back

$obj-E<gt>B<addReport>(OBJECT)

=over 4

See L<Mail::Reporter/"Error handling">

=back

$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])

Mail::Message::Head::Subset-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])

=over 4

See L<Mail::Reporter/"Error handling">

=back

$obj-E<gt>B<errors>

=over 4

See L<Mail::Reporter/"Error handling">

=back

$obj-E<gt>B<log>([LEVEL [,STRINGS]])

Mail::Message::Head::Subset-E<gt>B<log>([LEVEL [,STRINGS]])

=over 4

See L<Mail::Reporter/"Error handling">

=back

$obj-E<gt>B<logPriority>(LEVEL)

Mail::Message::Head::Subset-E<gt>B<logPriority>(LEVEL)

=over 4

See L<Mail::Reporter/"Error handling">

=back

$obj-E<gt>B<logSettings>

=over 4

See L<Mail::Reporter/"Error handling">

=back

$obj-E<gt>B<notImplemented>

=over 4

See L<Mail::Reporter/"Error handling">

=back

$obj-E<gt>B<report>([LEVEL])

=over 4

See L<Mail::Reporter/"Error handling">

=back

$obj-E<gt>B<reportAll>([LEVEL])

=over 4

See L<Mail::Reporter/"Error handling">

=back

$obj-E<gt>B<trace>([LEVEL])

=over 4

See L<Mail::Reporter/"Error handling">

=back

$obj-E<gt>B<warnings>

=over 4

See L<Mail::Reporter/"Error handling">

=back

=head2 Cleanup


$obj-E<gt>B<DESTROY>

=over 4

See L<Mail::Reporter/"Cleanup">

=back

$obj-E<gt>B<inGlobalDestruction>

=over 4

See L<Mail::Reporter/"Cleanup">

=back



=head1 DIAGNOSTICS

I<Error:> Package $package does not implement $method.

Fatal error: the specific package (or one of its superclasses) does not
implement this method where it should. This message means that some other
related classes do implement this method however the class at hand does
not.  Probably you should investigate this and probably inform the author
of the package.


=head1 DETAILS






=head1 REFERENCES

See the MailBox website at L<http://perl.overmeer.net/mailbox/> for more details.

=head1 COPYRIGHTS

Distribution version 2.058.
Written by Mark Overmeer (mark@overmeer.net).  See the ChangeLog for
other contributors.

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


