Und da ist die Doku besser?

Zudem habe ich ja meistens MIME-Mails.
Email-MIME-Attachment-Stripper
http://search.cpan.org/dist/Email-MIME-A…ent/Stripper.pm
Mail-Message-Attachment-Stripper-1.0
http://search.cpan.org/~tmtm/Mail-Messag…ent/Stripper.pm
----------------------------------------------------
This should be instantiated with a Email::MIME object.
Current arguments supported:
force_filename
Try harder to get a filename, making one up if necessary.
|
Source code
|
1
|
my $stripper = Email::MIME::Attachment::Stripper->new($mail, %args);
|
Das heißt jetzt auf Deutsch?
Ich lege ein neues Email::MIME Objekt an.
Aber wofür steht $mail und %args?
$mail wird die Mail sein, aber wie ist das gemeint bzw. woher kommen die Daten? Lass ich dort den kompletten Inhalt der TXT-Datei (die die Mail enthält) übergeben? Oder kann ich z.B. die Daten nehmen, die ich mittels
|
Source code
|
1
|
my $entity = $parser->parse_open("mail.txt")
|
eingelesen habe?
Was ist mit %args, was meiner Meinung nach ein Hash ist, siehe Prozentzeichen?
This returns the message with all the attachments detached. This will alter both the body and the header of the message.
|
Source code
|
1
|
my Email::MIME $msg = $stripper->message;
|
Woher kommt $msg? Was steht da drin?
This returns a list of all the attachments we found in the message, as a hash of { filename, content_type, payload }.
|
Source code
|
1
|
my @attachments = $stripper->attachments;
|
Ok, das letzte verstehe ich natürlich.
Also ich rall da nicht viel.