/[suikacvs]/messaging/manakai/lib/Message/Body/Multipart.pm
Suika

Diff of /messaging/manakai/lib/Message/Body/Multipart.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by wakaba, Fri Jul 19 11:49:22 2002 UTC revision 1.8 by wakaba, Sat Apr 23 07:14:30 2005 UTC
# Line 1  Line 1 
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    
# Line 14  $VERSION=do{my @r=(q$Revision$=~/\d+/g); Line 22  $VERSION=do{my @r=(q$Revision$=~/\d+/g);
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]#;
# Line 159  sub parse ($$;%) { Line 167  sub parse ($$;%) {
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
# Line 354  sub _generate_boundary ($$) { Line 380  sub _generate_boundary ($$) {
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
# Line 373  along with this program; see the file CO Line 401  along with this program; see the file CO
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    

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24