--- test/cvs 2002/07/02 06:37:56 1.28 +++ test/cvs 2002/07/03 23:39:15 1.29 @@ -8,7 +8,7 @@ package Message::Header; use strict; use vars qw(%DEFAULT @ISA %REG $VERSION); -$VERSION=do{my @r=(q$Revision: 1.28 $=~/\d+/g);sprintf "%d."."%02d" x $#r,@r}; +$VERSION=do{my @r=(q$Revision: 1.29 $=~/\d+/g);sprintf "%d."."%02d" x $#r,@r}; require Message::Field::Structured; ## This may seem silly:-) push @ISA, qw(Message::Field::Structured); @@ -128,6 +128,11 @@ $self->{option}->{ns_default_phuri} = $self->{ns}->{phname2uri}->{'rfc822'} unless $self->{option}->{ns_default_phuri}; + ## For text/rfc822-headers + if (ref $options{entity_header}) { + $self->{entity_header} = $options{entity_header}; + delete $options{entity_header}; + } my @new_fields = (); for my $name (keys %options) { unless (substr ($name, 0, 1) eq '-') { @@ -378,6 +383,16 @@ } } +## Defined for text/rfc822-headers +sub entity_header ($;$) { + my $self = shift; + my $new_header = shift; + if (ref $new_header) { + $self->{header} = $new_header; + } + $self->{header}; +} + =head2 $self->field_name_list () Returns list of all Cs. (Even if there are two @@ -830,7 +845,7 @@ =head1 CHANGE See F. -$Date: 2002/07/02 06:37:56 $ +$Date: 2002/07/03 23:39:15 $ =cut