Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

TeeJay (2309)

TeeJay
  (email not shown publicly)
http://www.aarontrevena.co.uk/

Working in Truro
Graduate with BSc (Hons) in Computer Systems and Networks
pm : london.pm, bath.pm, devoncornwall.pm
lug : Devon & Cornwall LUG
CPAN : TEEJAY [cpan.org]
irc : TeeJay
skype : hashbangperl
livejournal : hashbangperl [livejournal.com]
flickr :hashbangperl [flickr.com]

Journal of TeeJay (2309)

Monday November 24, 2003
02:40 PM

MIME::Entity/Head annoyance

[ #15982 ]
I am writing some code to handle SOAP with Attachments ( as needed by ebXML ) which uses MIME.

Fine, I think.. no problem thats all standard internet stuff the perl community will have dealt with plenty.

Nope. No mention of MIME in the SOAP::Lite perldoc, you need to check out the SOAP::Mime docs instead.

Not a problem, works fine.

The problem comes to when I use MIME::Parser to extract the MIME stuff at the other end - MIME::Parser doesn't directly deal with headers, it just parses it into a MIME::Entity object, which then holds the header in a MIME::Head object.

Fine, nice object oriented encapsulation.. except..

There is no way to get several important headers through the accessors, because at some point one of the modules throws them away!

For the love of god, why?!?

If you want to get the Content-Id from a part of a multipart message, you have to stick your fingers into the guts of objects inside objects and pull the value out from a hashref hidden deep inside.

gah!!!!

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • bah. unlike $self or $this which are programmed into my brain, $me doesn't really shout (hello, I'm the current object that this method was called on, etc). the internals of Mail::Internet are nasty and as the fix I tried to make Content-Id appear didn't have any effect I am not at all tempted to write a proper patch.
    --

    @JAPH = qw(Hacker Perl Another Just);
    print reverse @JAPH;
  • looks like its MIME::Entity's fault

    between fetching the MIME::Head myself manually, and through the M::E accessor, it sheds a load of headers that I want to use.

    Very annoying.

    --

    @JAPH = qw(Hacker Perl Another Just);
    print reverse @JAPH;