Re: Email::MIME walk_parts doesn't walk all my parts

2010-06-03 Thread Erik Logtenberg
 This looks like an incredibly stupid bug based on the incredibly stupid 
 -parts
 method.  Its behavior is really lame.
 
 I'm afraid I don't have a lot more time to look at this right now, but I'd 
 play
 around with tweaking walk_parts (in Email::MIME) to use -subparts instead,
 which is a lot saner.
 
 If that fixes this, it's probably a welcome patch.  Thanks for the report.

Yeah that fixes this indeed, thank you very much. Please find attached
the patch to MIME.pm with this fix.

Kind regards,

Erik.
--- Email/MIME.pm-orig	2009-12-23 17:35:11.0 +0100
+++ Email/MIME.pm	2010-06-03 23:39:39.334928669 +0200
@@ -712,9 +712,9 @@
   $walk = sub {
 my ($part) = @_;
 $callback-($part);
-if ($part-parts  1) {
+if ($part-subparts  0) {
   my @subparts;
-  for ($part-parts) {
+  for ($part-subparts) {
 push @subparts, $walk-($_);
   }
   $part-parts_set(\...@subparts);


Fwd: Re: Email::MIME walk_parts doesn't walk all my parts

2010-08-29 Thread Erik Logtenberg
Hi,

Since this change, inspired by Ricardo Signes, fixes an obvious bug in
Email::MIME, I'd like to request this patch be pushed into git. Also a
new release of Email::MIME containing this fix would be nice.

Kind regards,

Erik.


 Original Message 
Subject: Re: Email::MIME walk_parts doesn't walk all my parts
Date: Thu, 03 Jun 2010 23:43:24 +0200
From: Erik Logtenberg e...@logtenberg.eu
To: pep@perl.org

 This looks like an incredibly stupid bug based on the incredibly stupid 
 -parts
 method.  Its behavior is really lame.
 
 I'm afraid I don't have a lot more time to look at this right now, but I'd 
 play
 around with tweaking walk_parts (in Email::MIME) to use -subparts instead,
 which is a lot saner.
 
 If that fixes this, it's probably a welcome patch.  Thanks for the report.

Yeah that fixes this indeed, thank you very much. Please find attached
the patch to MIME.pm with this fix.

Kind regards,

Erik.

--- Email/MIME.pm-orig	2009-12-23 17:35:11.0 +0100
+++ Email/MIME.pm	2010-06-03 23:39:39.334928669 +0200
@@ -712,9 +712,9 @@
   $walk = sub {
 my ($part) = @_;
 $callback-($part);
-if ($part-parts  1) {
+if ($part-subparts  0) {
   my @subparts;
-  for ($part-parts) {
+  for ($part-subparts) {
 push @subparts, $walk-($_);
   }
   $part-parts_set(\...@subparts);