On Mon, 19 Apr 2004, Joseph Brennan wrote:

> b) Steffen, it sounds like you have a simpler way in mind to do the
> changes and know whether to do the open("w").  What is it?

Well, no; no "better" way. I've just checked out mimedefang.pl's
anomy_clean_html function, which uses perl's open() and is, therefore,
slurp'able. To stick to the MIME::Entity

Anyway, the IO::Handle used by MIME::Body is slurp'able, at least in my
simple sample:

use IO::Handle;

$fh = new IO::Handle;
if ($fh->fdopen(fileno(STDIN), "r")) {
   $line1 = <$fh>;
   undef $/;
   $lines = <$fh>;

   print "Line 1: $line1";
   print "=================== remaining lines:\n" , $lines;
}

To use open("w") looks good for me, because you emit all the message
within one call. -- One might try using:

          ### Create a body which stores data in an in-core array:
          $body = new MIME::Body::InCore [EMAIL PROTECTED];

or similiar, however, this keeps everything in the local memory of the
slave and probably some other part of MIMEDefang assumes that the body is
located on disk - and this is a RAMdisk most of the time, I guess.

Bye,

-- 
Steffen Kaiser
_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to