/[suikacvs]/test/cvs
Suika

Diff of /test/cvs

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

revision 1.27 by wakaba, Sun Jun 23 12:20:11 2002 UTC revision 1.29 by wakaba, Wed Jul 3 23:39:15 2002 UTC
# Line 35  push @ISA, qw(Message::Field::Structured Line 35  push @ISA, qw(Message::Field::Structured
35      -field_format_pattern       => '%s: %s',      -field_format_pattern       => '%s: %s',
36      -field_name_case_sensible   => 0,      -field_name_case_sensible   => 0,
37      -field_name_unsafe_rule     => 'NON_ftext',      -field_name_unsafe_rule     => 'NON_ftext',
38      -field_name_validation      => 1,   ## Method level option.      -field_name_validation      => 0,
39      -field_sort => 0,      -field_sort => 0,
40      #-format    => 'mail-rfc2822',      #-format    => 'mail-rfc2822',
41      -header_default_charset     => 'iso-2022-int-1',      -header_default_charset     => 'iso-2022-int-1',
# Line 128  sub _init ($;%) { Line 128  sub _init ($;%) {
128    $self->{option}->{ns_default_phuri} = $self->{ns}->{phname2uri}->{'rfc822'}    $self->{option}->{ns_default_phuri} = $self->{ns}->{phname2uri}->{'rfc822'}
129      unless $self->{option}->{ns_default_phuri};      unless $self->{option}->{ns_default_phuri};
130        
131      ## For text/rfc822-headers
132      if (ref $options{entity_header}) {
133        $self->{entity_header} = $options{entity_header};
134        delete $options{entity_header};
135      }
136    my @new_fields = ();    my @new_fields = ();
137    for my $name (keys %options) {    for my $name (keys %options) {
138      unless (substr ($name, 0, 1) eq '-') {      unless (substr ($name, 0, 1) eq '-') {
# Line 196  sub parse ($$;%) { Line 201  sub parse ($$;%) {
201    my $class = shift;    my $class = shift;
202    my $header = shift;    my $header = shift;
203    my $self = bless {}, $class;    my $self = bless {}, $class;
204    $self->_init (@_);    ## BUG: don't check linebreak_strict    $self->_init (@_);
205    $header =~ s/\x0D?\x0A$REG{WSP}/\x20/gos if $self->{option}->{use_folding};    if ($self->{option}->{linebreak_strict}) {
206        $header =~ s/\x0D\x0A$REG{WSP}/\x20/gos if $self->{option}->{use_folding};
207      } else {
208        $header =~ s/\x0D?\x0A$REG{WSP}/\x20/gos if $self->{option}->{use_folding};
209      }
210    for my $field (split /\x0D?\x0A/, $header) {    for my $field (split /\x0D?\x0A/, $header) {
211      if ($field =~ /$REG{M_fromline}/) {      if ($field =~ /$REG{M_fromline}/) {
212        my ($s,undef,$value) = $self->_value_to_arrayitem        my ($s,undef,$value) = $self->_value_to_arrayitem
# Line 374  sub _parse_value ($$$;%) { Line 383  sub _parse_value ($$$;%) {
383    }    }
384  }  }
385    
386    ## Defined for text/rfc822-headers
387    sub entity_header ($;$) {
388      my $self = shift;
389      my $new_header = shift;
390      if (ref $new_header) {
391        $self->{header} = $new_header;
392      }
393      $self->{header};
394    }
395    
396  =head2 $self->field_name_list ()  =head2 $self->field_name_list ()
397    
398  Returns list of all C<field-name>s.  (Even if there are two  Returns list of all C<field-name>s.  (Even if there are two

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.29

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24