NAME

Mail::Box::Tie - access an existing message-folder as an array or hash

INHERITANCE

Mail::Box::Tie is extended by
  Mail::Box::Tie::ARRAY
  Mail::Box::Tie::HASH

SYNOPSIS

As an array:

tie my(@inbox), Mail::Box::Tie::ARRAY => $folder;
print $inbox[3];

or as hash:

tie my(%inbox), Mail::Box::Tie::HASH => $folder;
print $inbox{'<12379.124879@example.com>'};

DESCRIPTION

Folders certainly look like an array of messages, so why not just access them as one? Or, the order is not important, but the message-ids are (give relations): why not access them from a hash based on this message-id? Programs using one of these ties will look simpler than programs using the more traditional method calls.

METHODS

Constructors

$class->new($folder, $type)

Do not call this method directly, but via the tie interface.

Attributes

$obj->folder()

$obj->type()

SEE ALSO

This module is part of Mail-Box version 3.012, built on November 27, 2025. Website: http://perl.overmeer.net/CPAN/

LICENSE

For contributors see file ChangeLog.

This software is copyright (c) 2001-2025 by Mark Overmeer.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.