r64664 - in /branches/upstream/libemail-mime-perl/current: Changes MANIFEST META.yml Makefile.PL lib/Email/MIME.pm lib/Email/MIME/Creator.pm lib/Email/MIME/Header.pm lib/Email/MIME/Modifier.pm t/walk-parts.t

ansgar at users.alioth.debian.org ansgar at users.alioth.debian.org
Sun Nov 7 12:38:13 UTC 2010


Author: ansgar
Date: Sun Nov  7 12:37:57 2010
New Revision: 64664

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=64664
Log:
[svn-upgrade] new version libemail-mime-perl (1.906)

Added:
    branches/upstream/libemail-mime-perl/current/t/walk-parts.t
Modified:
    branches/upstream/libemail-mime-perl/current/Changes
    branches/upstream/libemail-mime-perl/current/MANIFEST
    branches/upstream/libemail-mime-perl/current/META.yml
    branches/upstream/libemail-mime-perl/current/Makefile.PL
    branches/upstream/libemail-mime-perl/current/lib/Email/MIME.pm
    branches/upstream/libemail-mime-perl/current/lib/Email/MIME/Creator.pm
    branches/upstream/libemail-mime-perl/current/lib/Email/MIME/Header.pm
    branches/upstream/libemail-mime-perl/current/lib/Email/MIME/Modifier.pm

Modified: branches/upstream/libemail-mime-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-mime-perl/current/Changes?rev=64664&op=diff
==============================================================================
--- branches/upstream/libemail-mime-perl/current/Changes (original)
+++ branches/upstream/libemail-mime-perl/current/Changes Sun Nov  7 12:37:57 2010
@@ -1,4 +1,14 @@
 Revision history for Perl extension Email::MIME.
+
+1.906   2010-10-07
+        update our prereq on Test::More to 0.88
+
+1.905   2010-09-06
+        fix a long-standing bug that prevent walk_parts from reaching all parts
+        (thanks, Erik Logtenberg)
+
+1.904   2010-09-04
+        eliminate memory leak in walk_parts (reported by MKANAT, RT #59581)
 
 1.903   2009-12-23
         correct typo in body_set_str (RT #53004) (thanks, Herbert Leitz)

Modified: branches/upstream/libemail-mime-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-mime-perl/current/MANIFEST?rev=64664&op=diff
==============================================================================
--- branches/upstream/libemail-mime-perl/current/MANIFEST (original)
+++ branches/upstream/libemail-mime-perl/current/MANIFEST Sun Nov  7 12:37:57 2010
@@ -30,4 +30,5 @@
 t/read-nested.t
 t/singlepart.t
 t/unicode.t
+t/walk-parts.t
 META.yml                                 Module meta-data (added by MakeMaker)

Modified: branches/upstream/libemail-mime-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-mime-perl/current/META.yml?rev=64664&op=diff
==============================================================================
--- branches/upstream/libemail-mime-perl/current/META.yml (original)
+++ branches/upstream/libemail-mime-perl/current/META.yml Sun Nov  7 12:37:57 2010
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               Email-MIME
-version:            1.903
+version:            1.906
 abstract:           ~
 author:  []
 license:            perl
@@ -17,14 +17,14 @@
     Email::Simple::Creator:  0
     Encode:               1.9801
     MIME::Types:          1.13
-    Test::More:           0.47
+    Test::More:           0.88
 resources:
     repository:  http://github.com/rjbs/email-mime
 no_index:
     directory:
         - t
         - inc
-generated_by:       ExtUtils::MakeMaker version 6.55_02
+generated_by:       ExtUtils::MakeMaker version 6.56
 meta-spec:
     url:      http://module-build.sourceforge.net/META-spec-v1.4.html
     version:  1.4

Modified: branches/upstream/libemail-mime-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-mime-perl/current/Makefile.PL?rev=64664&op=diff
==============================================================================
--- branches/upstream/libemail-mime-perl/current/Makefile.PL (original)
+++ branches/upstream/libemail-mime-perl/current/Makefile.PL Sun Nov  7 12:37:57 2010
@@ -11,7 +11,7 @@
     'Email::Simple' => '2.004', # default_header_class
     'Encode'        => '1.9801',
     'MIME::Types'   => '1.13',
-    'Test::More'    => '0.47',
+    'Test::More'    => '0.88',
     'Email::MIME::ContentType' => '1.011',
     'Email::MIME::Encodings'   => '1.313',
     'Email::Simple::Creator'   => 0,

Modified: branches/upstream/libemail-mime-perl/current/lib/Email/MIME.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-mime-perl/current/lib/Email/MIME.pm?rev=64664&op=diff
==============================================================================
--- branches/upstream/libemail-mime-perl/current/lib/Email/MIME.pm (original)
+++ branches/upstream/libemail-mime-perl/current/lib/Email/MIME.pm Sun Nov  7 12:37:57 2010
@@ -21,7 +21,7 @@
 
 =head1 VERSION
 
-version 1.903
+version 1.906
 
 =head1 SYNOPSIS
 
@@ -111,7 +111,7 @@
 
 =cut
 
-our $VERSION = '1.903';
+our $VERSION = '1.906';
 
 use vars qw[$CREATOR];
 $CREATOR = 'Email::MIME::Creator';
@@ -433,7 +433,7 @@
   $email->content_type_set( 'text/html' );
 
 Change the content type. All C<Content-Type> header attributes
-will remain in tact.
+will remain intact.
 
 =cut
 
@@ -583,7 +583,7 @@
   $email->disposition_set( 'attachment' );
 
 Alter the C<Content-Disposition> of a message. All header attributes
-will remain in tact.
+will remain intact.
 
 =cut
 
@@ -712,17 +712,20 @@
   $walk = sub {
     my ($part) = @_;
     $callback->($part);
-    if ($part->parts > 1) {
-      my @subparts;
-      for ($part->parts) {
-        push @subparts, $walk->($_);
-      }
+
+    if ($part->subparts) {
+      my @subparts = map {; $walk->($_) } $part->subparts;
       $part->parts_set(\@subparts);
     }
+
     return $part;
   };
 
-  $walk->($self);
+  my $rv = $walk->($self);
+
+  undef $walk;
+
+  return $rv;
 }
 
 sub _compose_content_type {

Modified: branches/upstream/libemail-mime-perl/current/lib/Email/MIME/Creator.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-mime-perl/current/lib/Email/MIME/Creator.pm?rev=64664&op=diff
==============================================================================
--- branches/upstream/libemail-mime-perl/current/lib/Email/MIME/Creator.pm (original)
+++ branches/upstream/libemail-mime-perl/current/lib/Email/MIME/Creator.pm Sun Nov  7 12:37:57 2010
@@ -2,7 +2,7 @@
 use strict;
 
 use vars qw[$VERSION];
-$VERSION = '1.903';
+$VERSION = '1.906';
 
 use base q[Email::Simple::Creator];
 use Email::MIME;

Modified: branches/upstream/libemail-mime-perl/current/lib/Email/MIME/Header.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-mime-perl/current/lib/Email/MIME/Header.pm?rev=64664&op=diff
==============================================================================
--- branches/upstream/libemail-mime-perl/current/lib/Email/MIME/Header.pm (original)
+++ branches/upstream/libemail-mime-perl/current/lib/Email/MIME/Header.pm Sun Nov  7 12:37:57 2010
@@ -3,7 +3,7 @@
 package Email::MIME::Header;
 use base 'Email::Simple::Header';
 
-our $VERSION = '1.903';
+our $VERSION = '1.906';
 
 use Encode 1.9801;
 

Modified: branches/upstream/libemail-mime-perl/current/lib/Email/MIME/Modifier.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-mime-perl/current/lib/Email/MIME/Modifier.pm?rev=64664&op=diff
==============================================================================
--- branches/upstream/libemail-mime-perl/current/lib/Email/MIME/Modifier.pm (original)
+++ branches/upstream/libemail-mime-perl/current/lib/Email/MIME/Modifier.pm Sun Nov  7 12:37:57 2010
@@ -4,7 +4,7 @@
 package Email::MIME::Modifier;
 
 use vars qw[$VERSION];
-$VERSION = '1.903';
+$VERSION = '1.906';
 
 use Email::MIME;
 
@@ -16,7 +16,7 @@
 
 =head1 VERSION
 
-version 1.903
+version 1.906
 
 =head1 PERL EMAIL PROJECT
 

Added: branches/upstream/libemail-mime-perl/current/t/walk-parts.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-mime-perl/current/t/walk-parts.t?rev=64664&op=file
==============================================================================
--- branches/upstream/libemail-mime-perl/current/t/walk-parts.t (added)
+++ branches/upstream/libemail-mime-perl/current/t/walk-parts.t Sun Nov  7 12:37:57 2010
@@ -1,0 +1,63 @@
+use strict;
+use warnings;
+
+use Test::More 0.88;
+
+use Email::MIME;
+my $email;
+{
+  local $/;
+  $email = Email::MIME->new(<DATA>);
+}
+
+my @types;
+
+$email->walk_parts(sub {
+  my ($part) = @_;
+  push @types, $part->content_type;
+});
+
+is_deeply(
+  \@types,
+  [
+    'multipart/mixed;  boundary="----=_Part_13986_26026450.1275360964578"',
+    'multipart/related;  boundary="----=_Part_13987_10977679.1275360964578"',
+    'text/html; charset=iso-8859-1',
+    'image/gif',
+  ],
+  "walk_parts descends into all parts",
+);
+
+done_testing;
+
+__DATA__
+Received: from mx ([192.168.16.15])
+	by mbox (Dovecot) with LMTP id 3iaQF1x2BE
+	for <user at domain>; Tue, 01 Jun 2010 04:54:20 +0200
+Date: Tue, 1 Jun 2010 04:56:04 +0200 (CEST)
+From: Username <user at example.com>
+To: USer2 <user2 at example.com>
+Subject: Sample mail
+Mime-Version: 1.0
+Content-Type: multipart/mixed; 
+	boundary="----=_Part_13986_26026450.1275360964578"
+
+------=_Part_13986_26026450.1275360964578
+Content-Type: multipart/related; 
+	boundary="----=_Part_13987_10977679.1275360964578"
+
+------=_Part_13987_10977679.1275360964578
+Content-Type: text/html; charset=iso-8859-1
+Content-Transfer-Encoding: 7bit
+
+<html>mail</html>
+
+------=_Part_13987_10977679.1275360964578
+Content-Type: image/gif
+Content-Transfer-Encoding: base64
+Content-ID: default.large.gif
+
+R0lGODlhNgAkAPcAAAAA
+------=_Part_13987_10977679.1275360964578--
+
+------=_Part_13986_26026450.1275360964578--




More information about the Pkg-perl-cvs-commits mailing list