From a1204fbc2298de08854fc69c3df1fef480e9996a Mon Sep 17 00:00:00 2001 From: fukachan Date: Thu, 1 Feb 2001 08:30:58 +0000 Subject: save mail body without \r define Messages::raw_print() for it --- fml/lib/FML/Article.pm | 2 +- 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 }; } -- cgit v1.2.1