Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Email-MIME CPAN distribution.

Report information
The Basics
Id: 46675
Status: rejected
Priority: 0/
Queue: Email-MIME

People
Owner: Nobody in particular
Requestors: jidanni [...] jidanni.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: show structure recursively
Date: Fri, 05 Jun 2009 05:51:43 +0800
To: bug-Email-MIME [...] rt.cpan.org
From: jidanni [...] jidanni.org
On the man page, debug_structure my $description = $email->debug_structure; you should also please show how to see the entire structure, not just the top level.
That's exactly what that method does. If you had bothered to write a test for what you wanted, you would have seen that this works. Given this program: use strict; use Email::MIME; use Email::MIME::Creator; my $txt0 = Email::MIME->create(attributes => {content_type => 'text/plain'}); my $txt1 = Email::MIME->create(attributes => {content_type => 'text/plain'}); my $txt2 = Email::MIME->create(attributes => {content_type => 'text/plain'}); my $mp_0 = Email::MIME->create( attributes => { content_type => 'multipart/wtf' }, parts => [ $txt0 ], ); my $mp_1 = Email::MIME->create( attributes => { content_type => 'multipart/mixed' }, parts => [ $txt1, $mp_0 ], ); my $mp_2 = Email::MIME->create( attributes => { content_type => 'multipart/related' }, parts => [ $mp_1, $txt2 ] ); print $mp_2->debug_structure; The output is: + multipart/related; boundary="1244154420.5FAf4.18652" + multipart/mixed; boundary="1244154420.3FaFE3Ca1.18652" + text/plain + multipart/wtf; boundary="1244154420.542C0.18652" + text/plain -- rjbs
Subject: Re: [rt.cpan.org #46675] show structure recursively
Date: Fri, 05 Jun 2009 06:50:09 +0800
To: bug-email-mime [...] rt.cpan.org
From: jidanni [...] jidanni.org
1. Email::MIME::Creator is only mentioned in SEE ALSO. 2. The user wouldn't think of looking there, because he is not interested in creating a Mime message, but decoding it. Show quoted text
> That's exactly what that method does.
Not the method on the man page. Show quoted text
> If you had bothered to write a test for what you wanted, you would > have seen that this works.
Of course I wrote a test first. Show quoted text
> Given this program:
But that's not what is on the man page, here in Debian sid at least. The best one does reading that is something like local $/; $k=0; use Email::MIME; my $p = Email::MIME->new(<>); print $p->debug_structure; my @parts = $p->parts; for(@parts){print ++$k; print $_->debug_structure;...