16 |
push @ISA, qw(Message::Field::CSV); |
push @ISA, qw(Message::Field::CSV); |
17 |
%REG = %Message::Field::CSV::REG; |
%REG = %Message::Field::CSV::REG; |
18 |
$REG{SC_angle_addr} = qr/<(?:$REG{quoted_string}|$REG{domain_literal}|$REG{comment}|[^\x22\x28\x5B\x3E])+>|<>/; |
$REG{SC_angle_addr} = qr/<(?:$REG{quoted_string}|$REG{domain_literal}|$REG{comment}|[^\x22\x28\x5B\x3E])+>|<>/; |
19 |
$REG{SC_group} = qr/:(?:$REG{comment}|$REG{quoted_string}|(??{$REG{SC_group}})|$REG{domain_literal}|$REG{SC_angle_addr}|[^\x22\x28\x5B\x3A\x3E\x3B])+;/; |
$REG{SC_group} = qr/:(?:$REG{comment}|$REG{quoted_string}|(??{$REG{SC_group}})|$REG{domain_literal}|$REG{SC_angle_addr}|[^\x22\x28\x5B\x3A\x3E\x3B])*;/; |
20 |
|
|
21 |
=head1 CONSTRUCTORS |
=head1 CONSTRUCTORS |
22 |
|
|
115 |
} |
} |
116 |
$fb =~ s{(?:$REG{quoted_string}|$REG{comment}|[^\x22\x28\x2C\x3A\x3C\x5B]|$REG{SC_group}|$REG{SC_angle_addr}|$REG{domain_literal})+}{ |
$fb =~ s{(?:$REG{quoted_string}|$REG{comment}|[^\x22\x28\x2C\x3A\x3C\x5B]|$REG{SC_group}|$REG{SC_angle_addr}|$REG{domain_literal})+}{ |
117 |
my $s = $&; $s =~ s/^$REG{WSP}+//; $s =~ s/$REG{WSP}+$//; |
my $s = $&; $s =~ s/^$REG{WSP}+//; $s =~ s/$REG{WSP}+$//; |
118 |
if ($s =~ /^(?:$REG{quoted_string}|$REG{comment}|[^\x22\x28\x2C\x3A\x3C\x5B])*:/) { |
if ($s =~ /^(?:$REG{quoted_string}|$REG{comment}|[^\x22\x28\x2C\x3A-\x3C\x5B])*:/) { |
119 |
$s = $self->_parse_value (group => $s) if $self->{option}->{parse_all}; |
$s = $self->_parse_value (group => $s) if $self->{option}->{parse_all}; |
120 |
$s = {type => 'group', value => $s}; |
$s = {type => 'group', value => $s}; |
121 |
} else { ## address or keyword |
} else { ## address or keyword |
258 |
$_[0]->{group_name}; |
$_[0]->{group_name}; |
259 |
} |
} |
260 |
|
|
261 |
##TODO: addr_spec |
sub addr_spec ($;%) { |
262 |
|
my $self = shift; |
263 |
|
my @a; |
264 |
|
for (@{$self->{$self->{option}->{_ARRAY_NAME}}}) { |
265 |
|
$_->{value} = $self->_parse_value ($_->{value}) unless ref $_->{value}; |
266 |
|
if (ref $_->{value}) { |
267 |
|
push @a, $_->{value}->addr_spec (@_); |
268 |
|
} elsif (length $_->{value}) { |
269 |
|
push @a, $_->{value}; |
270 |
|
} |
271 |
|
} |
272 |
|
wantarray? @a: $a[0]; |
273 |
|
} |
274 |
|
|
275 |
## stringify: Inherited |
## stringify: Inherited |
276 |
#*as_string = \&stringify; |
#*as_string = \&stringify; |