libwww and MIME-tools

Joern Clausen (joern@techfak.uni-bielefeld.de)
Thu, 2 Jul 1998 15:18:00 +0200 (MET DST)


Hi!

Has anybody tried to use libwww and MIME-tools in one program? I'd like
to PUT some multipart/mixed message somewhere.

I have the impression, that combining these two modules is (unnecessarily)
complicated, as MIME-tools deals mostly with IO::Handles, instead of
raw data, but I might be wrong here. Another thing is, that I end up
doing things like

   $req->header('Content-Type' => $msg->head->get('Content-Type'));

where $req is a HTTP::Request and $msg is a MIME::Entity. I'd like
to stuff the headers of the MIME object into the HTTP header, and this
seems somewhat awkward. And, no, I'm not talking about a loop that does
this. Hm, is it possible to inherit from both classes, and have an
object that is both an HTTP::Request *and* a MIME::Entity at the same
time?

If anybody has some code to share, how this is done better, or if someone
has written some new classes for MIME, I'd be glad to have a look. Thanks!

-- 
     Joern Clausen                  email: joern@TechFak.Uni-Bielefeld.DE