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

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

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

revision 1.2 by wakaba, Tue May 14 13:42:40 2002 UTC revision 1.3 by wakaba, Wed May 15 07:29:09 2002 UTC
# Line 16  require Message::Field::CSV; Line 16  require Message::Field::CSV;
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    
# Line 115  sub _parse_list ($$) { Line 115  sub _parse_list ($$) {
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
# Line 258  sub display_name ($;$) { Line 258  sub display_name ($;$) {
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;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24