1 |
|
|
2 |
=head1 NAME |
=head1 NAME |
3 |
|
|
4 |
Message::Body::Multipart --- Perl module |
Message::Body::Multipart - MIME Multipart Body for Internet Messages |
5 |
for "multipart/*" Internet Media Types |
|
6 |
|
=head1 DESCRIPTION |
7 |
|
|
8 |
|
This module provides a support for C<multipart/*> Internet Media Types. |
9 |
|
With this module, each multipart body part can be treated |
10 |
|
as for standalone MIME messages. It also provides the access |
11 |
|
to prologue and epilogue. |
12 |
|
|
13 |
|
This module is part of manakai, a Perl library for Internet messages. |
14 |
|
|
15 |
=cut |
=cut |
16 |
|
|
22 |
require Message::Body::Text; |
require Message::Body::Text; |
23 |
push @ISA, qw(Message::Body::Text); |
push @ISA, qw(Message::Body::Text); |
24 |
|
|
25 |
my @BCHARS = ('0'..'9', 'A'..'Z', 'a'..'z', qw#+ _ , - . / : =#); |
my @BCHARS = ('0'..'9', 'A'..'Z', 'a'..'z', qw#+ _ , - . / =#); |
26 |
#my @BCHARS = ('0'..'9', 'A'..'Z', 'a'..'z', qw#' ( ) + _ , - . / : = ?#, ' '); ## RFC 2046 |
#my @BCHARS = ('0'..'9', 'A'..'Z', 'a'..'z', qw#' ( ) + _ , - . / : = ?#, ' '); ## RFC 2046 |
27 |
my %REG; |
my %REG; |
28 |
$REG{NON_bchars} = qr#[^0-9A-Za-z'()+_,-./:=?\x20]#; |
$REG{NON_bchars} = qr#[^0-9A-Za-z'()+_,-./:=?\x20]#; |
167 |
|
|
168 |
=back |
=back |
169 |
|
|
170 |
|
=item $obj = $mp->item ($index, %options) |
171 |
|
|
172 |
|
Returns the C<$index>th part as a MIME message object. |
173 |
|
If C<$index> is equal to or greater than the number of |
174 |
|
body parts this multipart body contains, then a new |
175 |
|
part is inserted to the last of the message and it is returned. |
176 |
|
Note that it does not necessariliy has the index of C<$index>. |
177 |
|
|
178 |
|
Use semantically named methods such as C<control_part> if |
179 |
|
the multipart type makes some assumption for the structure of |
180 |
|
the multipart body. For example, extracting the signature |
181 |
|
part from a C<multipart/signature> body, then the |
182 |
|
C<control_part> method is preferred to the method call C<item (0)>. |
183 |
|
|
184 |
|
=item $num = $mp->count |
185 |
|
|
186 |
|
Returns the number of body parts contained in this multipart body. |
187 |
|
|
188 |
=cut |
=cut |
189 |
|
|
190 |
## add, item, delete, count |
## add, item, delete, count |
380 |
|
|
381 |
RFC 2046 <urn:ietf:rfc:2046> |
RFC 2046 <urn:ietf:rfc:2046> |
382 |
|
|
383 |
|
SuikaWiki:multipart/* |
384 |
|
|
385 |
=head1 LICENSE |
=head1 LICENSE |
386 |
|
|
387 |
Copyright 2002 wakaba E<lt>w@suika.fam.cxE<gt>. |
Copyright 2002-2005 Wakaba <w@suika.fam.cx>. All rights reserved. |
388 |
|
|
389 |
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
390 |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
401 |
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
402 |
Boston, MA 02111-1307, USA. |
Boston, MA 02111-1307, USA. |
403 |
|
|
|
=head1 CHANGE |
|
|
|
|
|
See F<ChangeLog>. |
|
|
$Date$ |
|
|
|
|
404 |
=cut |
=cut |
405 |
|
|
406 |
1; |
1; # $Date$ |
407 |
|
|