Hello community, here is the log from the commit of package perl-MIME-tools for openSUSE:Factory checked in at 2017-04-12 17:36:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-MIME-tools (Old) and /work/SRC/openSUSE:Factory/.perl-MIME-tools.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-MIME-tools" Wed Apr 12 17:36:25 2017 rev:36 rq:486682 version:5.509 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-MIME-tools/perl-MIME-tools.changes 2016-09-26 12:36:21.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-MIME-tools.new/perl-MIME-tools.changes 2017-04-12 18:17:16.289004115 +0200 @@ -1,0 +2,24 @@ +Fri Apr 7 06:06:32 UTC 2017 - [email protected] + +- updated to 5.509 + see /usr/share/doc/packages/perl-MIME-tools/ChangeLog + + 5.509 2017-04-05 Dianne Skoll <[email protected]> + + * VERSION 5.509 RELEASED + + * Fix CPAN bug https://rt.cpan.org/Ticket/Display.html?id=120871 + Makefile.PL fails with no '.' in @INC + + * Fix CPAN bug https://rt.cpan.org/Ticket/Display.html?id=118262 + Test t/Ref.t fails on Windows install + + * Fix CPAN bug https://rt.cpan.org/Ticket/Display.html?id=119166 + MIME::Parser::parse_data() should check what it gets back... + + * Fix CPAN bug https://rt.cpan.org/Ticket/Display.html?id=119568 + Allow + to be used as line-end delimeter when outputting MIME + message. + +------------------------------------------------------------------- Old: ---- MIME-tools-5.508.tar.gz New: ---- MIME-tools-5.509.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-MIME-tools.spec ++++++ --- /var/tmp/diff_new_pack.N9lGv7/_old 2017-04-12 18:17:17.752797123 +0200 +++ /var/tmp/diff_new_pack.N9lGv7/_new 2017-04-12 18:17:17.756796558 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-MIME-tools # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,14 +17,14 @@ Name: perl-MIME-tools -Version: 5.508 +Version: 5.509 Release: 0 %define cpan_name MIME-tools Summary: Tools to manipulate MIME messages License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/MIME-tools/ -Source0: http://www.cpan.org/authors/id/D/DS/DSKOLL/%{cpan_name}-%{version}.tar.gz +Source0: https://cpan.metacpan.org/authors/id/D/DS/DSKOLL/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -63,6 +63,7 @@ %files -f %{name}.files %defattr(-,root,root,755) -%doc ChangeLog COPYING examples README +%doc ChangeLog examples README +%license COPYING %changelog ++++++ MIME-tools-5.508.tar.gz -> MIME-tools-5.509.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/ChangeLog new/MIME-tools-5.509/ChangeLog --- old/MIME-tools-5.508/ChangeLog 2016-08-29 16:46:05.000000000 +0200 +++ new/MIME-tools-5.509/ChangeLog 2017-04-05 19:32:53.000000000 +0200 @@ -1,3 +1,20 @@ +5.509 2017-04-05 Dianne Skoll <[email protected]> + + * VERSION 5.509 RELEASED + + * Fix CPAN bug https://rt.cpan.org/Ticket/Display.html?id=120871 + Makefile.PL fails with no '.' in @INC + + * Fix CPAN bug https://rt.cpan.org/Ticket/Display.html?id=118262 + Test t/Ref.t fails on Windows install + + * Fix CPAN bug https://rt.cpan.org/Ticket/Display.html?id=119166 + MIME::Parser::parse_data() should check what it gets back... + + * Fix CPAN bug https://rt.cpan.org/Ticket/Display.html?id=119568 + Allow \r\n to be used as line-end delimeter when outputting MIME + message. + 5.508 2016-08-29 Dianne Skoll <[email protected]> * VERSION 5.508 RELEASED diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/MANIFEST new/MIME-tools-5.509/MANIFEST --- old/MIME-tools-5.508/MANIFEST 2016-04-21 21:36:02.000000000 +0200 +++ new/MIME-tools-5.509/MANIFEST 2017-01-05 17:27:10.000000000 +0100 @@ -1,11 +1,5 @@ -COPYING ChangeLog -INSTALLING -MANIFEST -META.yml -Makefile.PL -README -examples/README +COPYING examples/mimeabuse examples/mimedump examples/mimeencode @@ -16,6 +10,7 @@ examples/mimesend examples/mimesender examples/mimetour +examples/README inc/Module/Install.pm inc/Module/Install/Base.pm inc/Module/Install/Can.pm @@ -24,18 +19,19 @@ inc/Module/Install/Metadata.pm inc/Module/Install/Win32.pm inc/Module/Install/WriteAll.pm +INSTALLING lib/MIME/Body.pm lib/MIME/Decoder.pm lib/MIME/Decoder/Base64.pm -lib/MIME/Decoder/BinHex.pm lib/MIME/Decoder/Binary.pm +lib/MIME/Decoder/BinHex.pm lib/MIME/Decoder/Gzip64.pm lib/MIME/Decoder/NBit.pm lib/MIME/Decoder/QuotedPrint.pm lib/MIME/Decoder/UU.pm lib/MIME/Entity.pm -lib/MIME/Field/ConTraEnc.pm lib/MIME/Field/ContDisp.pm +lib/MIME/Field/ConTraEnc.pm lib/MIME/Field/ContType.pm lib/MIME/Field/ParamVal.pm lib/MIME/Head.pm @@ -46,10 +42,17 @@ lib/MIME/Tools.pm lib/MIME/WordDecoder.pm lib/MIME/Words.pm +Makefile.PL +MANIFEST +META.yml +MYMETA.json +MYMETA.yml +README t/02-kwalitee.t t/02-pod-coverage.t t/02-pod.t t/99-prepare.t +t/attachment-filename-encoding.t t/Body.t t/BodyPrint.t t/Decoder.t @@ -60,17 +63,15 @@ t/Globby.pm t/Head.t t/Misc.t +t/obfuscated-zip.t t/ParamVal.t t/Parser.t t/ParserEncoded.t t/ParserPreamble.t t/Ref.t t/Smtpsend.t -t/WordDecoder.t -t/WordEncoder.t -t/Words.t -t/attachment-filename-encoding.t t/ticket-11901.t +t/ticket-119568.t t/ticket-22684.t t/ticket-37139.t t/ticket-41632.t @@ -83,6 +84,9 @@ t/ticket-71041.t t/ticket-71677.t t/ticket-80433.t +t/WordDecoder.t +t/WordEncoder.t +t/Words.t testin/ak-0696.msg testin/andreas-1296.txt testin/andreas-1296.uu @@ -153,9 +157,9 @@ testmsgs/german-qp.msg testmsgs/german.msg testmsgs/german.ref +testmsgs/hdr-fakeout-newmailtools-ref testmsgs/hdr-fakeout.msg testmsgs/hdr-fakeout.ref -testmsgs/hdr-fakeout-newmailtools-ref testmsgs/malformed-content-type-zip.msg testmsgs/multi-2evil.msg testmsgs/multi-2evil.ref diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/MYMETA.json new/MIME-tools-5.509/MYMETA.json --- old/MIME-tools-5.508/MYMETA.json 1970-01-01 01:00:00.000000000 +0100 +++ new/MIME-tools-5.509/MYMETA.json 2017-04-05 18:56:40.000000000 +0200 @@ -0,0 +1,63 @@ +{ + "abstract" : "Tools to manipulate MIME messages", + "author" : [ + "Eryq <[email protected]>, Dianne Skoll <[email protected]>, Dave O'Neill <[email protected]>" + ], + "dynamic_config" : 0, + "generated_by" : "Module::Install version 1.14, CPAN::Meta::Converter version 2.142690", + "license" : [ + "perl_5" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "MIME-tools", + "no_index" : { + "directory" : [ + "examples", + "inc", + "t" + ] + }, + "prereqs" : { + "build" : { + "requires" : { + "ExtUtils::MakeMaker" : "6.59", + "Test::Deep" : "0", + "Test::More" : "0" + } + }, + "configure" : { + "requires" : { + "ExtUtils::MakeMaker" : "0" + } + }, + "runtime" : { + "recommends" : { + "Convert::BinHex" : "0", + "MIME::Base64" : "3.03" + }, + "requires" : { + "File::Path" : "1", + "File::Spec" : "0.6", + "File::Temp" : "0.18", + "IO::File" : "1.13", + "IO::Handle" : "0", + "MIME::Base64" : "2.2", + "Mail::Field" : "1.05", + "Mail::Header" : "1.01", + "Mail::Internet" : "1.0203", + "perl" : "5.008" + } + } + }, + "release_status" : "stable", + "resources" : { + "license" : [ + "http://dev.perl.org/licenses/" + ] + }, + "version" : "5.508", + "x_module_name" : "MIME::Tools" +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/MYMETA.yml new/MIME-tools-5.509/MYMETA.yml --- old/MIME-tools-5.508/MYMETA.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/MIME-tools-5.509/MYMETA.yml 2017-04-05 18:56:40.000000000 +0200 @@ -0,0 +1,40 @@ +--- +abstract: 'Tools to manipulate MIME messages' +author: + - "Eryq <[email protected]>, Dianne Skoll <[email protected]>, Dave O'Neill <[email protected]>" +build_requires: + ExtUtils::MakeMaker: '6.59' + Test::Deep: '0' + Test::More: '0' +configure_requires: + ExtUtils::MakeMaker: '0' +dynamic_config: 0 +generated_by: 'Module::Install version 1.14, CPAN::Meta::Converter version 2.142690' +license: perl +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: '1.4' +name: MIME-tools +no_index: + directory: + - examples + - inc + - t +recommends: + Convert::BinHex: '0' + MIME::Base64: '3.03' +requires: + File::Path: '1' + File::Spec: '0.6' + File::Temp: '0.18' + IO::File: '1.13' + IO::Handle: '0' + MIME::Base64: '2.2' + Mail::Field: '1.05' + Mail::Header: '1.01' + Mail::Internet: '1.0203' + perl: '5.008' +resources: + license: http://dev.perl.org/licenses/ +version: '5.508' +x_module_name: MIME::Tools diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/Makefile.PL new/MIME-tools-5.509/Makefile.PL --- old/MIME-tools-5.508/Makefile.PL 2015-06-19 15:22:05.000000000 +0200 +++ new/MIME-tools-5.509/Makefile.PL 2017-04-03 16:56:40.000000000 +0200 @@ -1,5 +1,6 @@ use strict; use warnings; +use lib '.'; use inc::Module::Install; name 'MIME-tools'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/lib/MIME/Body.pm new/MIME-tools-5.509/lib/MIME/Body.pm --- old/MIME-tools-5.508/lib/MIME/Body.pm 2016-08-29 16:48:55.000000000 +0200 +++ new/MIME-tools-5.509/lib/MIME/Body.pm 2017-04-05 18:55:57.000000000 +0200 @@ -141,7 +141,7 @@ use IO::File; ### The package version, both in 1.23 style *and* usable by MakeMaker: -$VERSION = "5.508"; +$VERSION = "5.509"; #------------------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/lib/MIME/Decoder/Base64.pm new/MIME-tools-5.509/lib/MIME/Decoder/Base64.pm --- old/MIME-tools-5.508/lib/MIME/Decoder/Base64.pm 2016-08-29 16:48:55.000000000 +0200 +++ new/MIME-tools-5.509/lib/MIME/Decoder/Base64.pm 2017-04-05 19:53:05.000000000 +0200 @@ -60,7 +60,7 @@ @ISA = qw(MIME::Decoder); ### The package version, both in 1.23 style *and* usable by MakeMaker: -$VERSION = "5.508"; +$VERSION = "5.509"; ### How many bytes to encode at a time (must be a multiple of 3, and ### less than (76 * 0.75)! @@ -123,9 +123,10 @@ my $nread; my $buf = ''; + my $nl = $MIME::Entity::BOUNDARY_DELIMITER || "\n"; while ($nread = $in->read($buf, $EncodeChunkLength)) { - $encoded = encode_base64($buf); - $encoded .= "\n" unless ($encoded =~ /\n\Z/); ### ensure newline! + $encoded = encode_base64($buf, $nl); + $encoded .= $nl unless ($encoded =~ /$nl\Z/); ### ensure newline! $out->print($encoded); } 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/lib/MIME/Decoder/BinHex.pm new/MIME-tools-5.509/lib/MIME/Decoder/BinHex.pm --- old/MIME-tools-5.508/lib/MIME/Decoder/BinHex.pm 2016-08-29 16:48:55.000000000 +0200 +++ new/MIME-tools-5.509/lib/MIME/Decoder/BinHex.pm 2017-04-05 18:55:58.000000000 +0200 @@ -47,7 +47,7 @@ @ISA = qw(MIME::Decoder); # The package version, both in 1.23 style *and* usable by MakeMaker: -$VERSION = "5.508"; +$VERSION = "5.509"; #------------------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/lib/MIME/Decoder/Binary.pm new/MIME-tools-5.509/lib/MIME/Decoder/Binary.pm --- old/MIME-tools-5.508/lib/MIME/Decoder/Binary.pm 2016-08-29 16:48:55.000000000 +0200 +++ new/MIME-tools-5.509/lib/MIME/Decoder/Binary.pm 2017-04-05 18:55:58.000000000 +0200 @@ -47,7 +47,7 @@ @ISA = qw(MIME::Decoder); ### The package version, both in 1.23 style *and* usable by MakeMaker: -$VERSION = "5.508"; +$VERSION = "5.509"; ### Buffer length: my $BUFLEN = 8192; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/lib/MIME/Decoder/Gzip64.pm new/MIME-tools-5.509/lib/MIME/Decoder/Gzip64.pm --- old/MIME-tools-5.508/lib/MIME/Decoder/Gzip64.pm 2016-08-29 16:48:55.000000000 +0200 +++ new/MIME-tools-5.509/lib/MIME/Decoder/Gzip64.pm 2017-04-05 18:55:58.000000000 +0200 @@ -61,7 +61,7 @@ @ISA = qw(MIME::Decoder::Base64); # The package version, both in 1.23 style *and* usable by MakeMaker: -$VERSION = "5.508"; +$VERSION = "5.509"; # How to compress stdin to stdout: $GZIP = "gzip -c"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/lib/MIME/Decoder/NBit.pm new/MIME-tools-5.509/lib/MIME/Decoder/NBit.pm --- old/MIME-tools-5.508/lib/MIME/Decoder/NBit.pm 2016-08-29 16:48:55.000000000 +0200 +++ new/MIME-tools-5.509/lib/MIME/Decoder/NBit.pm 2017-04-05 18:55:58.000000000 +0200 @@ -98,7 +98,7 @@ @ISA = qw(MIME::Decoder); ### The package version, both in 1.23 style *and* usable by MakeMaker: -$VERSION = "5.508"; +$VERSION = "5.509"; ### How many bytes to decode at a time? my $DecodeChunkLength = 8 * 1024; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/lib/MIME/Decoder/QuotedPrint.pm new/MIME-tools-5.509/lib/MIME/Decoder/QuotedPrint.pm --- old/MIME-tools-5.508/lib/MIME/Decoder/QuotedPrint.pm 2016-08-29 16:48:55.000000000 +0200 +++ new/MIME-tools-5.509/lib/MIME/Decoder/QuotedPrint.pm 2017-04-05 18:55:58.000000000 +0200 @@ -58,7 +58,7 @@ @ISA = qw(MIME::Decoder); # The package version, both in 1.23 style *and* usable by MakeMaker: -$VERSION = "5.508"; +$VERSION = "5.509"; #------------------------------ # If we have MIME::QuotedPrint 3.03 or later, use the three-argument diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/lib/MIME/Decoder/UU.pm new/MIME-tools-5.509/lib/MIME/Decoder/UU.pm --- old/MIME-tools-5.508/lib/MIME/Decoder/UU.pm 2016-08-29 16:48:55.000000000 +0200 +++ new/MIME-tools-5.509/lib/MIME/Decoder/UU.pm 2017-04-05 19:53:21.000000000 +0200 @@ -48,7 +48,7 @@ @ISA = qw(MIME::Decoder); # The package version, both in 1.23 style *and* usable by MakeMaker: -$VERSION = "5.508"; +$VERSION = "5.509"; #------------------------------ @@ -106,9 +106,10 @@ my $fname = (($self->head && $self->head->mime_attr('content-disposition.filename')) || ''); - $out->print("begin 644 $fname\n"); + my $nl = $MIME::Entity::BOUNDARY_DELIMITER || "\n"; + $out->print("begin 644 $fname$nl"); while ($in->read($buf, 45)) { $out->print(pack('u', $buf)) } - $out->print("end\n"); + $out->print("end$nl"); 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/lib/MIME/Decoder.pm new/MIME-tools-5.509/lib/MIME/Decoder.pm --- old/MIME-tools-5.508/lib/MIME/Decoder.pm 2016-08-29 16:48:55.000000000 +0200 +++ new/MIME-tools-5.509/lib/MIME/Decoder.pm 2017-04-05 18:55:57.000000000 +0200 @@ -126,7 +126,7 @@ ); ### The package version, both in 1.23 style *and* usable by MakeMaker: -$VERSION = "5.508"; +$VERSION = "5.509"; ### Me: my $ME = 'MIME::Decoder'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/lib/MIME/Entity.pm new/MIME-tools-5.509/lib/MIME/Entity.pm --- old/MIME-tools-5.508/lib/MIME/Entity.pm 2016-08-29 16:48:54.000000000 +0200 +++ new/MIME-tools-5.509/lib/MIME/Entity.pm 2017-04-05 20:03:05.000000000 +0200 @@ -194,7 +194,17 @@ $top->print_body(\*STDOUT); Stringify... note that C<stringify_xx> can also be written C<xx_as_string>; -the methods are synonymous, and neither form will be deprecated: +the methods are synonymous, and neither form will be deprecated. + +If you set the variable $MIME::Entity::BOUNDARY_DELIMITER to a string, +that string will be used as the line-end delimiter on output. If it is not set, +the line ending will be a newline character (\n) + +NOTE that $MIME::Entity::BOUNDARY_DELIMITER only applies to structural +parts of the MIME data generated by this package and to the Base64 +encoded output; if a part internally uses a different line-end +delimiter and is output as-is, the line-ending is not changed to match +$MIME::Entity::BOUNDARY_DELIMITER. ### Stringify the entire message: print $top->stringify; ### or $top->as_string @@ -245,7 +255,7 @@ #------------------------------ ### The package version, both in 1.23 style *and* usable by MakeMaker: -$VERSION = "5.508"; +$VERSION = "5.509"; ### Boundary counter: my $BCount = 0; @@ -264,7 +274,7 @@ ); ### Fallback preamble and epilogue: -my $DefPreamble = [ "This is a multi-part message in MIME format...\n" ]; +my $DefPreamble = [ "This is a multi-part message in MIME format..." ]; my $DefEpilogue = [ ]; @@ -767,6 +777,7 @@ sub body { my ($self, $value) = @_; + my $boundary_delimiter = $MIME::Entity::BOUNDARY_DELIMITER || "\n"; if (@_ > 1) { ### setting body line(s)... croak "you cannot use body() to set the encoded contents\n"; } else { @@ -776,7 +787,7 @@ close($fh); my @ary = split(/\n/, $output); # Each line needs the terminating newline - @ary = map { "$_\n" } @ary; + @ary = map { "$_$boundary_delimiter" } @ary; return \@ary; } @@ -1383,6 +1394,7 @@ my %params = @_; my $io; + my $boundary_delimiter = $MIME::Entity::BOUNDARY_DELIMITER || "\n"; ### If multipart and not attaching, try to sign our first part: if ($self->is_multipart and !$params{Attach}) { return $self->parts(0)->sign(@_); @@ -1429,8 +1441,8 @@ my $line; $io = $self->open("w") or croak("open: $!"); foreach $line (@body) { $io->print($line) }; ### body data - (($body[-1]||'') =~ /\n\Z/) or $io->print("\n"); ### ensure final \n - $io->print("-- \n$sig"); ### separator + sig + (($body[-1]||'') =~ /\n\Z/) or $io->print($boundary_delimiter); ### ensure final \n + $io->print("-- $boundary_delimiter$sig"); ### separator + sig $io->close or croak("close: $!"); return 1; ### done! } @@ -1764,11 +1776,12 @@ use Symbol; sub print { my ($self, $out) = @_; + my $boundary_delimiter = $MIME::Entity::BOUNDARY_DELIMITER || "\n"; $out = select if @_ < 2; $out = Symbol::qualify($out,scalar(caller)) unless ref($out); $self->print_header($out); ### the header - $out->print("\n"); + $out->print($boundary_delimiter); $self->print_body($out); ### the "stuff after the header" } @@ -1809,6 +1822,7 @@ my ($self, $out) = @_; $out ||= select; my ($type) = split '/', lc($self->mime_type); ### handle by MIME type + my $boundary_delimiter = $MIME::Entity::BOUNDARY_DELIMITER || "\n"; ### Multipart... if ($type eq 'multipart') { @@ -1819,26 +1833,26 @@ if (defined $plines) { # Defined, so output the preamble if it exists (avoiding additional # newline as per ticket 60931) - $out->print( join('', @$plines) . "\n") if (@$plines > 0); + $out->print( join('', @$plines) . $boundary_delimiter) if (@$plines > 0); } else { # Undefined, so use default preamble - $out->print( join('', @$DefPreamble) . "\n" ); + $out->print( join('', @$DefPreamble) . $boundary_delimiter . $boundary_delimiter ); } ### Parts: my $part; foreach $part ($self->parts) { - $out->print("--$boundary\n"); + $out->print("--$boundary$boundary_delimiter"); $part->print($out); - $out->print("\n"); ### needed for next delim/close + $out->print($boundary_delimiter); ### needed for next delim/close } - $out->print("--$boundary--\n"); + $out->print("--$boundary--$boundary_delimiter"); ### Epilogue: my $epilogue = join('', @{ $self->epilogue || $DefEpilogue }); if ($epilogue ne '') { $out->print($epilogue); - $out->print("\n") if ($epilogue !~ /\n\Z/); ### be nice + $out->print($boundary_delimiter) if ($epilogue !~ /\n\Z/); ### be nice } } @@ -1849,7 +1863,7 @@ my $need_sep = 0; my $part; foreach $part ($self->parts) { - $out->print("\n\n") if $need_sep++; + $out->print("$boundary_delimiter$boundary_delimiter") if $need_sep++; $part->print($out); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/lib/MIME/Field/ConTraEnc.pm new/MIME-tools-5.509/lib/MIME/Field/ConTraEnc.pm --- old/MIME-tools-5.508/lib/MIME/Field/ConTraEnc.pm 2016-08-29 16:48:55.000000000 +0200 +++ new/MIME-tools-5.509/lib/MIME/Field/ConTraEnc.pm 2017-04-05 18:55:58.000000000 +0200 @@ -47,7 +47,7 @@ @ISA = qw(MIME::Field::ParamVal); # The package version, both in 1.23 style *and* usable by MakeMaker: -$VERSION = "5.508"; +$VERSION = "5.509"; # Install it: bless([])->register('Content-transfer-encoding'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/lib/MIME/Field/ContDisp.pm new/MIME-tools-5.509/lib/MIME/Field/ContDisp.pm --- old/MIME-tools-5.508/lib/MIME/Field/ContDisp.pm 2016-08-29 16:48:55.000000000 +0200 +++ new/MIME-tools-5.509/lib/MIME/Field/ContDisp.pm 2017-04-05 18:55:58.000000000 +0200 @@ -48,7 +48,7 @@ @ISA = qw(MIME::Field::ParamVal); # The package version, both in 1.23 style *and* usable by MakeMaker: -$VERSION = "5.508"; +$VERSION = "5.509"; # Install it: bless([])->register('Content-disposition'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/lib/MIME/Field/ContType.pm new/MIME-tools-5.509/lib/MIME/Field/ContType.pm --- old/MIME-tools-5.508/lib/MIME/Field/ContType.pm 2016-08-29 16:48:55.000000000 +0200 +++ new/MIME-tools-5.509/lib/MIME/Field/ContType.pm 2017-04-05 18:55:58.000000000 +0200 @@ -63,7 +63,7 @@ @ISA = qw(MIME::Field::ParamVal); # The package version, both in 1.23 style *and* usable by MakeMaker: -$VERSION = "5.508"; +$VERSION = "5.509"; # Install it: bless([])->register('Content-type'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/lib/MIME/Field/ParamVal.pm new/MIME-tools-5.509/lib/MIME/Field/ParamVal.pm --- old/MIME-tools-5.508/lib/MIME/Field/ParamVal.pm 2016-08-29 16:48:55.000000000 +0200 +++ new/MIME-tools-5.509/lib/MIME/Field/ParamVal.pm 2017-04-05 18:55:58.000000000 +0200 @@ -80,7 +80,7 @@ #------------------------------ # The package version, both in 1.23 style *and* usable by MakeMaker: -$VERSION = "5.508"; +$VERSION = "5.509"; #------------------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/lib/MIME/Head.pm new/MIME-tools-5.509/lib/MIME/Head.pm --- old/MIME-tools-5.508/lib/MIME/Head.pm 2016-08-29 16:48:55.000000000 +0200 +++ new/MIME-tools-5.509/lib/MIME/Head.pm 2017-04-05 19:36:08.000000000 +0200 @@ -138,7 +138,7 @@ #------------------------------ ### The package version, both in 1.23 style *and* usable by MakeMaker: -$VERSION = "5.508"; +$VERSION = "5.509"; ### Sanity (we put this test after our own version, for CPAN::): use Mail::Header 1.06 (); @@ -555,12 +555,17 @@ I<Instance method.> Return the header as a string. You can also invoke it as C<as_string>. +If you set the variable $MIME::Entity::BOUNDARY_DELIMITER to a string, +that string will be used as line-end delimiter. If it is not set, +the line ending will be a newline character (\n) + =cut sub stringify { my $self = shift; ### build clean header, and output... my @header = grep {defined($_) ? $_ : ()} @{$self->header}; - join "", map { /\n$/ ? $_ : "$_\n" } @header; + my $header_delimiter = $MIME::Entity::BOUNDARY_DELIMITER || "\n"; + join "", map { /\n$/ ? substr($_, 0, -1) . $header_delimiter : $_ . $header_delimiter } @header; } sub as_string { shift->stringify(@_) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/lib/MIME/Parser.pm new/MIME-tools-5.509/lib/MIME/Parser.pm --- old/MIME-tools-5.508/lib/MIME/Parser.pm 2016-08-29 16:48:55.000000000 +0200 +++ new/MIME-tools-5.509/lib/MIME/Parser.pm 2017-04-05 18:55:57.000000000 +0200 @@ -153,7 +153,7 @@ #------------------------------ ### The package version, both in 1.23 style *and* usable by MakeMaker: -$VERSION = "5.508"; +$VERSION = "5.509"; ### How to catenate: $CAT = '/bin/cat'; @@ -1109,6 +1109,10 @@ sub parse_data { my ($self, $data) = @_; + if (!defined($data)) { + croak "parse_data: No data passed"; + } + ### Get data as a scalar: my $io; @@ -1126,6 +1130,10 @@ croak "parse_data: wrong argument ref type: ", ref($data); } + if (!$io) { + croak "parse_data: unable to open in-memory file handle"; + } + ### Parse! return $self->parse($io); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/lib/MIME/Tools.pm new/MIME-tools-5.509/lib/MIME/Tools.pm --- old/MIME-tools-5.508/lib/MIME/Tools.pm 2016-08-29 16:48:49.000000000 +0200 +++ new/MIME-tools-5.509/lib/MIME/Tools.pm 2017-04-05 18:55:55.000000000 +0200 @@ -28,7 +28,7 @@ Exporter::export_ok_tags('config', 'msgs', 'msgtypes', 'utils'); # The TOOLKIT version, both in 1.23 style *and* usable by MakeMaker: -$VERSION = "5.508"; +$VERSION = "5.509"; # Configuration (do NOT alter this directly)... # All legal CONFIG vars *must* be in here, even if only to be set to undef: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/lib/MIME/Words.pm new/MIME-tools-5.509/lib/MIME/Words.pm --- old/MIME-tools-5.508/lib/MIME/Words.pm 2016-08-29 16:48:55.000000000 +0200 +++ new/MIME-tools-5.509/lib/MIME/Words.pm 2017-04-05 18:55:57.000000000 +0200 @@ -94,7 +94,7 @@ #------------------------------ ### The package version, both in 1.23 style *and* usable by MakeMaker: -$VERSION = "5.508"; +$VERSION = "5.509"; ### Nonprintables (controls + x7F + 8bit): my $NONPRINT = "\\x00-\\x1F\\x7F-\\xFF"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/t/Ref.t new/MIME-tools-5.509/t/Ref.t --- old/MIME-tools-5.508/t/Ref.t 2016-04-21 21:38:47.000000000 +0200 +++ new/MIME-tools-5.509/t/Ref.t 2016-10-04 22:41:06.000000000 +0200 @@ -40,7 +40,8 @@ # print STDERR " $msgpath\n"; ### HACK HACK HACK: MailTools behaviour has changed!!! - if ($msgpath eq 'testmsgs/hdr-fakeout.msg' && $::Mail::Header::VERSION > 2.14) { + if ($msgpath =~ /hdr-fakeout.msg$/ && + $::Mail::Header::VERSION > 2.14) { $refpath = 'testmsgs/hdr-fakeout-newmailtools-ref'; } ### Get reference, as ref to array: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/t/obfuscated-zip.t new/MIME-tools-5.509/t/obfuscated-zip.t --- old/MIME-tools-5.508/t/obfuscated-zip.t 1970-01-01 01:00:00.000000000 +0100 +++ new/MIME-tools-5.509/t/obfuscated-zip.t 2013-10-10 19:54:41.000000000 +0200 @@ -0,0 +1,18 @@ +use strict; +use warnings; + +use Test::More tests => 2; + +# Handle a missing type in the Content-Type: header + +use MIME::Parser; +my $parser = MIME::Parser->new(); +$parser->output_to_core(0); +$parser->output_under("testout"); +my $entity = $parser->parse_open("testmsgs/malformed-content-type-zip.msg"); + +is(scalar($entity->parts), 2, 'Entity has two parts'); +is($entity->parts(1)->head->mime_attr('content-type.name'), 'payroll_report_429047_10092013.zip', 'Got expected attachment name'); + +1; + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIME-tools-5.508/t/ticket-119568.t new/MIME-tools-5.509/t/ticket-119568.t --- old/MIME-tools-5.508/t/ticket-119568.t 1970-01-01 01:00:00.000000000 +0100 +++ new/MIME-tools-5.509/t/ticket-119568.t 2017-04-05 20:02:27.000000000 +0200 @@ -0,0 +1,49 @@ +#!/usr/bin/perl -w +use strict; +use warnings; +use Test::More tests => 4; + +use MIME::Entity; +use MIME::Parser; +use lib qw( ./t ); + +my $e = MIME::Entity->build(From => '[email protected]', + To => '[email protected]', + Subject => 'End-of-line test', + Data => ["Line 1\n", "Line 2\n"],); + +my $str = $e->as_string(); +is ($str, "Content-Type: text/plain\nContent-Disposition: inline\nContent-Transfer-Encoding: binary\nMIME-Version: 1.0\nX-Mailer: MIME-tools 5.509 (Entity 5.509)\nFrom: dfs\@roaringpenguin.com\nTo: dfs2\@roaringpenguin.com\nSubject: End-of-line test\n\nLine 1\nLine 2\n", 'Got expected line endings'); + +my $delim = "\r\n"; +$MIME::Entity::BOUNDARY_DELIMITER = $delim; +$e = MIME::Entity->build(From => '[email protected]', + To => '[email protected]', + Subject => 'End-of-line test', + Data => ["Line 1$delim", "Line 2$delim"],); + +$str = $e->as_string(); + +is ($str, "Content-Type: text/plain${delim}Content-Disposition: inline${delim}Content-Transfer-Encoding: binary${delim}MIME-Version: 1.0${delim}X-Mailer: MIME-tools 5.509 (Entity 5.509)${delim}From: dfs\@roaringpenguin.com${delim}To: dfs2\@roaringpenguin.com${delim}Subject: End-of-line test${delim}${delim}Line 1${delim}Line 2${delim}", 'Got expected line endings'); + +$e->attach(Data => ["More Text$delim"], Type => "text/plain"); + +$e = MIME::Entity->build(From => '[email protected]', + To => '[email protected]', + Subject => 'End-of-line test', + Type => 'multipart/mixed', Boundary => 'foo'); +$e->attach(Data => ["Text$delim"], Type => "text/plain"); +$e->attach(Data => ["More Text$delim"], Type => "text/plain"); +$str = $e->as_string(); +is ($str, "Content-Type: multipart/mixed; boundary=\"foo\"${delim}Content-Transfer-Encoding: binary${delim}MIME-Version: 1.0${delim}X-Mailer: MIME-tools 5.509 (Entity 5.509)${delim}From: dfs\@roaringpenguin.com${delim}To: dfs2\@roaringpenguin.com${delim}Subject: End-of-line test${delim}${delim}This is a multi-part message in MIME format...${delim}${delim}--foo${delim}Content-Type: text/plain${delim}Content-Disposition: inline${delim}Content-Transfer-Encoding: binary${delim}${delim}Text${delim}${delim}--foo${delim}Content-Type: text/plain${delim}Content-Disposition: inline${delim}Content-Transfer-Encoding: binary${delim}${delim}More Text${delim}${delim}--foo--${delim}", 'Got expected line endings'); + +$e = MIME::Entity->build(From => '[email protected]', + To => '[email protected]', + Subject => 'End-of-line test', + Type => 'multipart/mixed', Boundary => 'foo'); +$e->attach(Data => ["Text\n"], Type => "text/plain", Encoding => 'Base64'); +$e->attach(Data => ["More Text\n", 'LongLine' x 120], Type => "text/plain", Encoding => 'Base64'); +$str = $e->as_string(); + +is ($str, "Content-Type: multipart/mixed; boundary=\"foo\"${delim}Content-Transfer-Encoding: binary${delim}MIME-Version: 1.0${delim}X-Mailer: MIME-tools 5.509 (Entity 5.509)${delim}From: dfs\@roaringpenguin.com${delim}To: dfs2\@roaringpenguin.com${delim}Subject: End-of-line test${delim}${delim}This is a multi-part message in MIME format...${delim}${delim}--foo${delim}Content-Type: text/plain${delim}Content-Disposition: inline${delim}Content-Transfer-Encoding: Base64${delim}${delim}VGV4dAo=${delim}${delim}--foo${delim}Content-Type: text/plain${delim}Content-Disposition: inline${delim}Content-Transfer-Encoding: Base64${delim}${delim}TW9yZSBUZXh0CkxvbmdMaW5lTG9uZ0xpbmVMb25nTGluZUxvbmdMaW5lTG9u${delim}Z0xpbmVMb25nTGluZUxvbmdMaW5lTG9uZ0xpbmVMb25nTGluZUxvbmdMaW5l${delim}TG9uZ0xpbmVMb25nTGluZUxvbmdMaW5lTG9uZ0xpbmVMb25nTGluZUxvbmdM${delim}aW5lTG9uZ0xpbmVMb25nTGluZUxvbmdMaW5lTG9uZ0xpbmVMb25nTGluZUxv${delim}bmdMaW5lTG9uZ0xpbmVMb25nTGluZUxvbmdMaW5lTG9uZ0xpbmVMb25nTGlu${delim}ZUxvbmdMaW5lTG9uZ0xpbmVMb25nTGluZUxvbmdMaW5lTG9uZ0xpbmVMb25n${delim}TGluZUxvbmdMaW5lTG9uZ0xpbmVMb25nTGluZUxvbmdMaW5lTG9uZ0xpbmVM${delim}b25nTGluZUxvbmdMaW5lTG9uZ0xpbmVMb25nTGluZUxvbmdMaW5lTG9uZ0xp${delim}bmVMb25nTGluZUxvbmdMaW5lTG9uZ0xpbmVMb25nTGluZUxvbmdMaW5lTG9u${delim}Z0xpbmVMb25nTGluZUxvbmdMaW5lTG9uZ0xpbmVMb25nTGluZUxvbmdMaW5l${delim}TG9uZ0xpbmVMb25nTGluZUxvbmdMaW5lTG9uZ0xpbmVMb25nTGluZUxvbmdM${delim}aW5lTG9uZ0xpbmVMb25nTGluZUxvbmdMaW5lTG9uZ0xpbmVMb25nTGluZUxv${delim}bmdMaW5lTG9uZ0xpbmVMb25nTGluZUxvbmdMaW5lTG9uZ0xpbmVMb25nTGlu${delim}ZUxvbmdMaW5lTG9uZ0xpbmVMb25nTGluZUxvbmdMaW5lTG9uZ0xpbmVMb25n${delim}TGluZUxvbmdMaW5lTG9uZ0xpbmVMb25nTGluZUxvbmdMaW5lTG9uZ0xpbmVM${delim}b25nTGluZUxvbmdMaW5lTG9uZ0xpbmVMb25nTGluZUxvbmdMaW5lTG9uZ0xp${delim}bmVMb25nTGluZUxvbmdMaW5lTG9uZ0xpbmVMb25nTGluZUxvbmdMaW5lTG9u${delim}Z0xpbmVMb25nTGluZUxvbmdMaW5lTG9uZ0xpbmVMb25nTGluZUxvbmdMaW5l${delim}TG9uZ0xpbmVMb25nTGluZUxvbmdMaW5lTG9uZ0xpbmVMb25nTGluZUxvbmdM${delim}aW5lTG9uZ0xpbmVMb25nTGluZUxvbmdMaW5lTG9uZ0xpbmVMb25nTGluZUxv${delim}bmdMaW5lTG9uZ0xpbmVMb25nTGluZUxvbmdMaW5lTG9uZ0xpbmVMb25nTGlu${delim}ZUxvbmdMaW5lTG9uZ0xpbmVMb25nTGluZQ==${delim}${delim}--foo--${delim}", 'Got expected line endings for Base64 encoding'); +
