Mail::Box::Tie(3pm)

Mail::Box::Tie3pm

Access an existing message-folder as an array or hash

Usage

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{'<[email protected]>'};

Inheritance

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

Overview

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()

Diagnostics

Error: no folder specified to tie to.

Cast by new()

Releases

13 releases since Debian 3.0 (Woody); the text changed 11 times.

  1. 3.0
  2. 3.1
  3. 4.0
  4. 5.0
  5. 6.0
  6. 7
  7. 8
  8. 9
  9. 10
  10. 11–12
  11. 13
  12. Arch

License

For contributors see file ChangeLog.

This software is copyright (c) 2001-2026 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.

From perl-mail-box 4.02-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.