Dave Rolsky > Courriel-0.31 > Courriel::Part::Multipart

Download:
Courriel-0.31.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
Stalled  1
View/Report Bugs
Module Version: 0.31   Source   Latest Release: Courriel-0.35

NAME ^

Courriel::Part::Multipart - A part which contains other parts

VERSION ^

version 0.31

SYNOPSIS ^

  my $headers = $part->headers();
  my $ct = $part->content_type();

  for my $subpart ( $part->parts ) { ... }

DESCRIPTION ^

This class represents a multipart email part which contains other parts.

API ^

This class provides the following methods:

Courriel::Part::Multipart->new( ... )

This method creates a new part object. It accepts the following parameters:

$part->parts()

Returns an array (not a reference) of the parts this part contains.

$part->part_count()

Returns the number of parts this part contains.

$part->boundary()

Returns the part boundary.

$part->mime_type()

Returns the mime type for this part.

$part->content_type()

Returns the Courriel::Header::ContentType object for this part.

$part->headers()

Returns the Courriel::Headers object for this part.

$part->is_inline(), $part->is_attachment()

These methods always return false, but exist for the sake of providing a consistent API between Single and Multipart part objects.

$part->is_multipart()

Returns true.

$part->preamble()

The preamble as passed to the constructor.

$part->epilogue()

The epilogue as passed to the constructor.

$part->container()

Returns the Courriel or Courriel::Part::Multipart object to which this part belongs, if any. This is set when the part is added to another object.

$part->stream_to( output => $output )

This method will send the stringified part to the specified output. The output can be a subroutine reference, a filehandle, or an object with a print() method. The output may be sent as a single string, as a list of strings, or via multiple calls to the output.

See the as_string() method for documentation on the charset parameter.

$part->as_string()

Returns the part as a string, along with its headers. Lines will be terminated with "\r\n".

ROLES ^

This class does the Courriel::Role::Part and Courriel::Role::Streams roles.

AUTHOR ^

Dave Rolsky <autarch@urth.org>

CONTRIBUTOR ^

Zbigniew Łukasiak <zzbbyy@gmail.com>

COPYRIGHT AND LICENSE ^

This software is Copyright (c) 2013 by Dave Rolsky.

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)
syntax highlighting: