
=head1 NAME

Mail::Box::MH::Labels - maintain MH message related labels


=head1 INHERITANCE

 Mail::Box::MH::Labels
   is a Mail::Reporter


=head1 SYNOPSIS

 my $labels = Mail::Box::MH::Labels->new;
 $labels->read(...)
 $labels->write(...)


=head1 DESCRIPTION

MH type message folders use one dedicated file per folder-directory to list
special tags to messages in that folder.  By doing this, mail agents may
avoid parsing all the messages, which is very resource consuming.

Labels can be used to group messages, for instance to reflect which
messages have been read or which look like spam.  Some labels are
predefined, but more can be added without limitation.



=head1 METHODS


=head2 Constructors


Mail::Box::MH::Labels-E<gt>B<new>(OPTIONS)

=over 4

 Option    Defined in       Default      
 filename                   <required>   
 log       L<Mail::Reporter>  C<'WARNINGS'>
 trace     L<Mail::Reporter>  C<'WARNINGS'>

. filename FILENAME

=over 4

The FILENAME which is used in each directory to store the headers of all
mails. The filename must be an absolute path.

=back

. log LEVEL

. trace LEVEL

=back

=head2 The Label Table


$obj-E<gt>B<append>(MESSAGES)

=over 4

Append the label information about the specified MESSAGES to the end
of the label file.  The information will not be merged with the
information already present in the label file.

=back

$obj-E<gt>B<filename>

=over 4

Returns the name of the index file.

=back

$obj-E<gt>B<get>(MSGNR)

=over 4

Look if there is label info for message MSGNR.

=back

$obj-E<gt>B<print>(FILEHANDLE, MESSAGES)

=over 4

Print the labels of the specified messages to the opened file.

=back

$obj-E<gt>B<read>

=over 4

Read all label information from file.

=back

$obj-E<gt>B<write>(MESSAGES)

=over 4

Write the labels related to the specified messages to the label file.

=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, [LEVEL])

Mail::Box::MH::Labels-E<gt>B<defaultTrace>([LEVEL, [LEVEL])

=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::Box::MH::Labels-E<gt>B<log>([LEVEL [,STRINGS]])

=over 4

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

=back

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

Mail::Box::MH::Labels-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 REFERENCES

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

=head1 COPYRIGHTS

Distribution version 2.055.
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.


