Mark Overmeer > Mail-Box-3.001 > Mail::Box::Tie

Download:
Mail-Box-3.001.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  8
View/Report Bugs
Module Version: 3.001   Source  

NAME ^

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

SYNOPSIS ^

As an array:

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

or as hash:

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

DESCRIPTION ^

The use of Mail::Box::Tie is deprecated, because it is succeeded by two separate modules: Mail::Box::Tie::ARRAY and Mail::Box::Tie::HASH. However, this module still works.

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 ^

SEE ALSO ^

This module is part of Mail-Box distribution version 3.001, built on February 06, 2017.

Do not forget to read Mail::Box-Overview, Mail::Box-Cookbook, and Mail::Box-Index. Examples are included in the Mail-Box distribution, directories 'examples' and 'scripts'.

Browseable manuals, papers, and other released material van be found at Website: http://perl.overmeer.net/mailbox/

The central modules (in separate distributions) in the MailBox suite are: Mail::Message, Mail::Box, Mail::Box::IMAP4, Mail::Box::POP3, Mail::Box::Parser::C, Mail::Box::Dbx (unpublished), Mail::Transport, Object::Realize::Later, and User::Identity.

Please post questions or ideas to the author markov@cpan.org.

LICENSE ^

Copyrights 2001-2017 by [Mark Overmeer]. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html

syntax highlighting: