Ricardo SIGNES > Data-Message-1.012 > Data::Message

Download:
Data-Message-1.012.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 1.012   Source   Latest Release: Data-Message-1.104

NAME ^

Data::Message - Parse and Reconstruct RFC2822 Compliant Messages

SYNOPSIS ^

  use Data::Message;
  
  my $message = Data::Message->new(join('',<>), fold => 1);
  
  print $message->header("Customer-ID");
  print $message->body;

DESCRIPTION ^

This module is a generic interface to dealing with RFC2822 compliant messages. Email is the most common example of messages in this format, but not the only one. HTTP requests and responses are also sent and received in this format. Many other systems rely on storing or sending information with a header of key/value pairs followed by an optional body.

Because Email::Simple is so good at parsing this format, and so fast, this module inherits from it. Changes to the interface are only prevelant in options provided to the constructor new(). For any other interface usage documentation, please see Email::Simple.

Because Data::Message is a subclass of Email::Simple, its mixins will work with this package. For example, you may use Email::Simple::Creator to aid in the creation of Data::Message objects from scratch.

new()

  my $message = Data::Message->new(join( '', <> ));

The first argument is a scalar value containing the text of the payload to be parsed. Subsequent arguments are passed as key/value pairs.

SEE ALSO ^

Email::Simple, Email::Simple::Creator, Email::Simple::Headers, perl.

AUTHOR ^

Casey West, <casey@geeknest.com>.

COPYRIGHT ^

  Copyright (c) 2004 Casey West.  All rights reserved.
  This module is free software; you can redistribute it and/or modify it
  under the same terms as Perl itself.
syntax highlighting: