diff -r 4ba3303aae86 -r c1810f067e5d lib/Message/2822.pm --- a/lib/Message/2822.pm Wed Jan 04 15:10:55 2012 +0100 +++ b/lib/Message/2822.pm Wed Jan 04 16:49:38 2012 +0100 @@ -50,18 +50,18 @@ return join "" => @r; } -#sub remove_header_lines { -# my $self = shift; -# my $pattern = shift // die "Need a pattern!"; -# $DATA{header}{$self} =~ s/^$pattern.*?(?=^\S|\Z)//imsg; -#} +sub remove_header_lines { + my $self = shift; + my $pattern = shift // die "Need a pattern!"; + $DATA{header}{$self} =~ s/^$pattern.*?(?=^\S|\Z)//imsg; +} -#sub add_header_line { -#my $self = shift; -#my $_ = shift; -#$_ .= "\n" unless /\n$/; -#$DATA{header}{$self} .= $_; -#} +sub add_header_line { + my $self = shift; + my $_ = shift; + $_ .= "\n" unless /\n$/; + $DATA{header}{$self} .= $_; +} sub header_contents { my $self = shift; @@ -134,19 +134,19 @@ The construcor. The file is opened r/o and read. The file will not be closed until the object disappears. -=item B([I]) +=item @list = B([I]) Return a list of existing header fields, matching the pattern. See B for information about the returned format. (default pattern: /.*/) -=item B([I]) +=item @list = B([I]) Returns the header line matching the I. See B about the returned format. (default pattern: /.*/) -=item B([I]) +=item @list = B([I]) Returns the contents of the header lines matching the pattern. (default pattern: /.*/) @@ -159,13 +159,13 @@ since it is considered a part of the field name. I is case insensitive! -=item B() +=item $scalar = $B() -Returns the original header as it is in a single scalar. +Returns the original header as it is. -=item B() +=item $body = B() -Returns the original body as it is in a single scalar. +Returns the original body as it is. =back