91 |
sub _decode_parameters ($\@\%) { |
sub _decode_parameters ($\@\%) { |
92 |
my $self = shift; |
my $self = shift; |
93 |
my ($param, $option) = @_; |
my ($param, $option) = @_; |
94 |
|
my @a; |
95 |
if ($param->[0]->{no_value} && $param->[0]->{charset} eq '*bare') { |
if ($param->[0]->{no_value} && $param->[0]->{charset} eq '*bare') { |
96 |
|
## first item doesn't have value and is not a quoted-string itself, |
97 |
my $name = shift (@$param)->{attribute}; |
my $name = shift (@$param)->{attribute}; |
98 |
my $from = ''; |
my $from = ''; |
99 |
if ($name =~ m#^((?:$REG{quoted_string}|[^\x22\x2F])+)/((?:$REG{quoted_string}|[^\x22])+)$#) { |
if ($name =~ m#^((?:$REG{quoted_string}|[^\x22\x2F])+)/((?:$REG{quoted_string}|[^\x22])+)$#) { |
106 |
$from =~ s/^$REG{WSP}+//; $from =~ s/$REG{WSP}+$//; |
$from =~ s/^$REG{WSP}+//; $from =~ s/$REG{WSP}+$//; |
107 |
$from = Message::Util::decode_quoted_string ($self, $from) if length $from; |
$from = Message::Util::decode_quoted_string ($self, $from) if length $from; |
108 |
if (length $from) { |
if (length $from) { |
109 |
push @$param, {attribute => 'of', value => $from}; |
push @a, {attribute => 'of', value => $from}; |
110 |
} |
} |
111 |
} elsif ($param->[0]->{no_value}) { ## was A quoted-string |
} elsif ($param->[0]->{no_value}) { ## was A quoted-string |
112 |
my %s = &{$option->{hook_decode_string}} |
my %s = &{$option->{hook_decode_string}} |
114 |
$self->{value} = $s{value}; |
$self->{value} = $s{value}; |
115 |
} |
} |
116 |
$self->SUPER::_decode_parameters ($param, $option); |
$self->SUPER::_decode_parameters ($param, $option); |
117 |
|
push @$param, @a; |
118 |
} |
} |
119 |
|
|
120 |
=back |
=back |