/[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.6 by wakaba, Mon Jul 8 11:48:12 2002 UTC revision 1.7 by wakaba, Fri Jul 19 11:49:22 2002 UTC
# Line 64  sub _init ($;%) { Line 64  sub _init ($;%) {
64    $self->{option}->{value_type}->{body_part}->[1]->{-format}    $self->{option}->{value_type}->{body_part}->[1]->{-format}
65      =      =
66    my @ilist = qw/accept_coderange body_default_charset body_default_charset_input cte_default text_coderange/;    my @ilist = qw/accept_coderange body_default_charset body_default_charset_input cte_default text_coderange/;
67    $self->{option}->{value_type}->{preamble} = ['Message::Body::TextPlain',    $self->{option}->{value_type}->{preamble} = sub {
68      {-media_type => 'text', -media_subtype => '/multipart-preamble'},      my $phdr = new Message::Header -format => 'mail-rfc822';
69      \@ilist];      my $ct = '';
70        $ct = $self->{header}->field ('content-type', -new_item_unless_exist => 0) if ref $self->{header};
71        $ct = $ct->item ('x-preamble-type', -new_item_unless_exist => 0) if ref $ct;
72        $phdr->add ('content-type' => $ct) if $ct;
73        ['Message::Body::TextPlain',
74        {-media_type => 'text', -media_subtype => '/multipart-preamble',
75        entity_header => $phdr},
76        \@ilist]};
77    $self->{option}->{value_type}->{body_part} = sub {['Message::Entity',    $self->{option}->{value_type}->{body_part} = sub {['Message::Entity',
78      {-format => $_[0]->{option}->{format} . '/' . 'mime-entity',      {-format => $_[0]->{option}->{format} . '/' . 'mime-entity',
79      -body_default_media_type => $_[0]->{option}->{default_media_type},      -body_default_media_type => $_[0]->{option}->{default_media_type},
80      -body_default_media_subtype => $_[0]->{option}->{default_media_subtype}},      -body_default_media_subtype => $_[0]->{option}->{default_media_subtype}},
81      \@ilist]};      \@ilist]};
82    $self->{option}->{value_type}->{epilogue} = ['Message::Body::TextPlain',    $self->{option}->{value_type}->{epilogue} = sub {
83      {-media_type => 'text', -media_subtype => '/multipart-epilogue'},      my $phdr = new Message::Header -format => 'mail-rfc822';
84      \@ilist];      my $ct = '';
85        $ct = $self->{header}->field ('content-type', -new_item_unless_exist => 0) if ref $self->{header};
86        $ct = $ct->item ('x-epilogue-type', -new_item_unless_exist => 0) if ref $ct;
87        $phdr->add ('content-type' => $ct) if $ct;
88        ['Message::Body::TextPlain',
89        {-media_type => 'text', -media_subtype => '/multipart-epilogue',
90        entity_header => $phdr},
91        \@ilist]};
92        
93    $self->{boundary} = $option{boundary};    $self->{boundary} = $option{boundary};
94    if (!length $self->{boundary} && ref $self->{header}) {    if (!length $self->{boundary} && ref $self->{header}) {
95      my $ct = $self->{header}->field ('content-type', -new_item_unless_exist => 0);      my $ct = $self->{header}->field ('content-type', -new_item_unless_exist => 0);
96      $self->{boundary} = $ct->parameter ('boundary') if ref $ct;      $self->{boundary} = $ct->parameter ('boundary', -new_item_unless_exist => 0)
97          if ref $ct;
98    }    }
99        
100    my $mst = $self->{option}->{media_subtype};    my $mst = $self->{option}->{media_subtype};

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24