Sorry, I was just trying to make it readable.
I've found the problem is simply I can't set the "Type=>xxx" after the object is created, whenever I try I simply get "no data in this part" and if I set it and try to update it after using "add" or "replace", it doesn't change.
I have things working but I have to create the MIME::Lite object each time for each type I want to send (instead of being able to build it as I go).