diff options
| author | fukachan <fukachan> | 2001-02-01 08:30:58 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-02-01 08:30:58 +0000 |
| commit | a1204fbc2298de08854fc69c3df1fef480e9996a (patch) | |
| tree | d2fb98256d69ac37f9dbb950902474b9007ca218 | |
| parent | dfd5005ef11bc29dfa5d2608c2f13dc02467f2fd (diff) | |
| download | fml8-a1204fbc2298de08854fc69c3df1fef480e9996a.tar.gz fml8-a1204fbc2298de08854fc69c3df1fef480e9996a.tar.bz2 fml8-a1204fbc2298de08854fc69c3df1fef480e9996a.zip | |
save mail body without \r
define Messages::raw_print() for it
| -rw-r--r-- | fml/lib/FML/Article.pm | 2 | ||||
| -rw-r--r-- | fml/lib/MailingList/Messages.pm | 19 |
2 files changed, 19 insertions, 2 deletions
diff --git a/fml/lib/FML/Article.pm b/fml/lib/FML/Article.pm index 47f2eb15..5f63c11a 100644 --- a/fml/lib/FML/Article.pm +++ b/fml/lib/FML/Article.pm @@ -110,7 +110,7 @@ sub spool_in if (defined $fh) { $curproc->{ article }->{ header }->print($fh); print $fh "\n"; - $curproc->{ article }->{ body }->print($fh); + $curproc->{ article }->{ body }->raw_print($fh); $fh->close; Log("Article $id"); } diff --git a/fml/lib/MailingList/Messages.pm b/fml/lib/MailingList/Messages.pm index 557f2611..5f4938dc 100644 --- a/fml/lib/MailingList/Messages.pm +++ b/fml/lib/MailingList/Messages.pm @@ -153,6 +153,16 @@ If $fd is not specified, STDOUT is used. =cut +sub raw_print +{ + my ($self, $fd) = @_; + + $self->{ _raw_print } = 1; + $self->print($fd); + delete $self->{ _raw_print }; +} + + sub print { my ($self, $fd) = @_; @@ -163,7 +173,14 @@ sub print MSG: while (1) { - $self->_print($fd, $msg->{ content }); + if (defined $self->{ _raw_print }) { + my $r_body = $msg->{ content }; + print $fd $$r_body; + } + else { + $self->_print($fd, $msg->{ content }); + } + last MSG unless $msg->{ next }; $msg = $self->{ next }; } |
