/[suikacvs]/messaging/manakai/lib/Message/Field/Structured.pm
Suika

Diff of /messaging/manakai/lib/Message/Field/Structured.pm

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

revision 1.15 by wakaba, Sat Jun 15 07:15:59 2002 UTC revision 1.16 by wakaba, Sun Jun 23 12:10:16 2002 UTC
# Line 41  The following methods construct new C<Me Line 41  The following methods construct new C<Me
41      field_name  => 'x-structured',      field_name  => 'x-structured',
42      #field_ns   => '',      #field_ns   => '',
43      format      => 'mail-rfc2822',      format      => 'mail-rfc2822',
44        ## MIME charset name of '*default' charset
45          header_default_charset    => 'iso-2022-int-1',
46          header_default_charset_input      => 'iso-2022-int-1',
47      hook_encode_string  => #sub {shift; (value => shift, @_)},      hook_encode_string  => #sub {shift; (value => shift, @_)},
48          \&Message::Util::encode_header_string,          \&Message::Util::encode_header_string,
49      hook_decode_string  => #sub {shift; (value => shift, @_)},      hook_decode_string  => #sub {shift; (value => shift, @_)},
# Line 576  sub _comment_stringify ($\%) { Line 579  sub _comment_stringify ($\%) {
579  sub scan ($&;%) {  sub scan ($&;%) {
580    my $self = shift;    my $self = shift;
581    my $sub = shift;    my $sub = shift;
582    my %p = @_; my %option = %{$self->{option}};    my %p = @_;  my %option;
583    for (grep {/^-/} keys %p) {$option{substr ($_, 1)} = $p{$_}}    if (ref $p{options} eq 'HASH') {
584    my $array = $self->{option}->{_ARRAY_NAME}      %option = %{$p{options}};
585             || $self->{option}->{_HASH_NAME};    } else {
586    my @param = $self->_scan_sort (\@{$self->{$array}});      %option = %{$self->{option}};
587        for (grep {/^-/} keys %p) {$option{substr ($_, 1)} = $p{$_}}
588      }
589      my $array = $option{_ARRAY_NAME} || $option{_HASH_NAME};
590      my @param = $self->_scan_sort (\@{$self->{$array}}, \%option);
591    #my $sort = $option{sort};    #my $sort = $option{sort};
592    #@param = sort $sort @param if ref $sort;    #@param = sort $sort @param if ref $sort;
593    for my $param (@param) {    for my $param (@param) {
594      &$sub($self, $param);      &$sub($self, $param, \%option);
595    }    }
596  }  }
597    

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24