@@ -1,5 +1,9 @@
Revision history for Perl extension Email::MIME.
+1.929 2015-02-17 09:31:35-05:00 America/New_York
+ - try not to lose unrecognized content-type parameters
+ - avoid copying the body content when not needed during construction
+
1.928 2014-12-15 21:47:49-05:00 America/New_York
- when converting from single part to multipart, drop
Content-Transfer-Encoding and Content-Type's charset property
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.029.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.031.
Changes
LICENSE
MANIFEST
@@ -20,6 +20,7 @@ t/Mail/mail-2
t/Mail/nested-parts
t/auto_create.t
t/basic.t
+t/body-ref.t
t/content_id.t
t/ct_attrs.t
t/dispo.t
@@ -6,13 +6,13 @@
"Simon Cozens <simon@cpan.org>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 5.029, CPAN::Meta::Converter version 2.143240",
+ "generated_by" : "Dist::Zilla version 5.031, CPAN::Meta::Converter version 2.143240",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
- "version" : "2"
+ "version" : 2
},
"name" : "Email-MIME",
"prereqs" : {
@@ -71,10 +71,10 @@
"web" : "https://github.com/rjbs/Email-MIME"
}
},
- "version" : "1.928",
+ "version" : "1.929",
"x_Dist_Zilla" : {
"perl" : {
- "version" : "5.021005"
+ "version" : "5.021008"
},
"plugins" : [
{
@@ -97,12 +97,12 @@
}
},
"name" : "@RJBS/Git::GatherDir",
- "version" : "2.028"
+ "version" : "2.029"
},
{
"class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed",
"name" : "@RJBS/CheckPrereqsIndexed",
- "version" : "0.013"
+ "version" : "0.015"
},
{
"class" : "Dist::Zilla::Plugin::CheckExtraTests",
@@ -123,7 +123,7 @@
}
},
"name" : "@RJBS/RJBS-Outdated",
- "version" : "0.032"
+ "version" : "0.038"
},
{
"class" : "Dist::Zilla::Plugin::PromptIfStale",
@@ -137,62 +137,62 @@
}
},
"name" : "@RJBS/CPAN-Outdated",
- "version" : "0.032"
+ "version" : "0.038"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@RJBS/@Filter/PruneCruft",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::ManifestSkip",
"name" : "@RJBS/@Filter/ManifestSkip",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@RJBS/@Filter/MetaYAML",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@RJBS/@Filter/License",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::Readme",
"name" : "@RJBS/@Filter/Readme",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@RJBS/@Filter/ExecDir",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@RJBS/@Filter/ShareDir",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@RJBS/@Filter/Manifest",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@RJBS/@Filter/TestRelease",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@RJBS/@Filter/ConfirmRelease",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@RJBS/@Filter/UploadToCPAN",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
@@ -202,12 +202,12 @@
}
},
"name" : "@RJBS/MakeMaker",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::AutoPrereqs",
"name" : "@RJBS/AutoPrereqs",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::Git::NextVersion",
@@ -222,27 +222,27 @@
}
},
"name" : "@RJBS/Git::NextVersion",
- "version" : "2.028"
+ "version" : "2.029"
},
{
"class" : "Dist::Zilla::Plugin::PkgVersion",
"name" : "@RJBS/PkgVersion",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@RJBS/MetaConfig",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@RJBS/MetaJSON",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::NextRelease",
"name" : "@RJBS/NextRelease",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::Test::ChangesHasContent",
@@ -252,12 +252,12 @@
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@RJBS/PodSyntaxTests",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::Test::ReportPrereqs",
"name" : "@RJBS/Test::ReportPrereqs",
- "version" : "0.019"
+ "version" : "0.020"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
@@ -268,7 +268,7 @@
}
},
"name" : "@RJBS/TestMoreWithSubtests",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::PodWeaver",
@@ -285,92 +285,92 @@
{
"class" : "Pod::Weaver::Plugin::EnsurePod5",
"name" : "@CorePrep/EnsurePod5",
- "version" : "4.009"
+ "version" : "4.010"
},
{
"class" : "Pod::Weaver::Plugin::H1Nester",
"name" : "@CorePrep/H1Nester",
- "version" : "4.009"
+ "version" : "4.010"
},
{
"class" : "Pod::Weaver::Plugin::SingleEncoding",
"name" : "@RJBS/SingleEncoding",
- "version" : "4.009"
+ "version" : "4.010"
},
{
"class" : "Pod::Weaver::Section::Name",
"name" : "@RJBS/Name",
- "version" : "4.009"
+ "version" : "4.010"
},
{
"class" : "Pod::Weaver::Section::Version",
"name" : "@RJBS/Version",
- "version" : "4.009"
+ "version" : "4.010"
},
{
"class" : "Pod::Weaver::Section::Region",
"name" : "@RJBS/Prelude",
- "version" : "4.009"
+ "version" : "4.010"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "@RJBS/Synopsis",
- "version" : "4.009"
+ "version" : "4.010"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "@RJBS/Description",
- "version" : "4.009"
+ "version" : "4.010"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "@RJBS/Overview",
- "version" : "4.009"
+ "version" : "4.010"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "@RJBS/Stability",
- "version" : "4.009"
+ "version" : "4.010"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "Attributes",
- "version" : "4.009"
+ "version" : "4.010"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "Methods",
- "version" : "4.009"
+ "version" : "4.010"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "Functions",
- "version" : "4.009"
+ "version" : "4.010"
},
{
"class" : "Pod::Weaver::Section::Leftovers",
"name" : "@RJBS/Leftovers",
- "version" : "4.009"
+ "version" : "4.010"
},
{
"class" : "Pod::Weaver::Section::Region",
"name" : "@RJBS/postlude",
- "version" : "4.009"
+ "version" : "4.010"
},
{
"class" : "Pod::Weaver::Section::Authors",
"name" : "@RJBS/Authors",
- "version" : "4.009"
+ "version" : "4.010"
},
{
"class" : "Pod::Weaver::Section::Legal",
"name" : "@RJBS/Legal",
- "version" : "4.009"
+ "version" : "4.010"
},
{
"class" : "Pod::Weaver::Plugin::Transformer",
"name" : "@RJBS/List",
- "version" : "4.009"
+ "version" : "4.010"
}
]
}
@@ -402,7 +402,7 @@
}
},
"name" : "@RJBS/@Git/Check",
- "version" : "2.028"
+ "version" : "2.029"
},
{
"class" : "Dist::Zilla::Plugin::Git::Commit",
@@ -425,7 +425,7 @@
}
},
"name" : "@RJBS/@Git/Commit",
- "version" : "2.028"
+ "version" : "2.029"
},
{
"class" : "Dist::Zilla::Plugin::Git::Tag",
@@ -433,7 +433,7 @@
"Dist::Zilla::Plugin::Git::Tag" : {
"branch" : null,
"signed" : 0,
- "tag" : "1.928",
+ "tag" : "1.929",
"tag_format" : "%v",
"tag_message" : "v%v",
"time_zone" : "local"
@@ -443,7 +443,7 @@
}
},
"name" : "@RJBS/@Git/Tag",
- "version" : "2.028"
+ "version" : "2.029"
},
{
"class" : "Dist::Zilla::Plugin::Git::Push",
@@ -460,7 +460,7 @@
}
},
"name" : "@RJBS/@Git/Push",
- "version" : "2.028"
+ "version" : "2.029"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
@@ -471,52 +471,52 @@
}
},
"name" : "Prereqs",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::Encoding",
"name" : "Encoding",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":IncModules",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":MainModule",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":AllFiles",
- "version" : "5.029"
+ "version" : "5.031"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":NoFiles",
- "version" : "5.029"
+ "version" : "5.031"
}
],
"zilla" : {
@@ -524,7 +524,7 @@
"config" : {
"is_trial" : "0"
},
- "version" : "5.029"
+ "version" : "5.031"
}
}
}
@@ -13,7 +13,7 @@ build_requires:
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 0
-generated_by: 'Dist::Zilla version 5.029, CPAN::Meta::Converter version 2.143240'
+generated_by: 'Dist::Zilla version 5.031, CPAN::Meta::Converter version 2.143240'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -40,10 +40,10 @@ resources:
bugtracker: https://github.com/rjbs/Email-MIME/issues
homepage: https://github.com/rjbs/Email-MIME
repository: https://github.com/rjbs/Email-MIME.git
-version: '1.928'
+version: '1.929'
x_Dist_Zilla:
perl:
- version: '5.021005'
+ version: '5.021008'
plugins:
-
class: Dist::Zilla::Plugin::Git::GatherDir
@@ -61,11 +61,11 @@ x_Dist_Zilla:
Dist::Zilla::Role::Git::Repo:
repo_root: .
name: '@RJBS/Git::GatherDir'
- version: '2.028'
+ version: '2.029'
-
class: Dist::Zilla::Plugin::CheckPrereqsIndexed
name: '@RJBS/CheckPrereqsIndexed'
- version: '0.013'
+ version: '0.015'
-
class: Dist::Zilla::Plugin::CheckExtraTests
name: '@RJBS/CheckExtraTests'
@@ -81,7 +81,7 @@ x_Dist_Zilla:
phase: build
skip: []
name: '@RJBS/RJBS-Outdated'
- version: '0.032'
+ version: '0.038'
-
class: Dist::Zilla::Plugin::PromptIfStale
config:
@@ -92,62 +92,62 @@ x_Dist_Zilla:
phase: release
skip: []
name: '@RJBS/CPAN-Outdated'
- version: '0.032'
+ version: '0.038'
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@RJBS/@Filter/PruneCruft'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::ManifestSkip
name: '@RJBS/@Filter/ManifestSkip'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@RJBS/@Filter/MetaYAML'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::License
name: '@RJBS/@Filter/License'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::Readme
name: '@RJBS/@Filter/Readme'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::ExecDir
name: '@RJBS/@Filter/ExecDir'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::ShareDir
name: '@RJBS/@Filter/ShareDir'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::Manifest
name: '@RJBS/@Filter/Manifest'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::TestRelease
name: '@RJBS/@Filter/TestRelease'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@RJBS/@Filter/ConfirmRelease'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@RJBS/@Filter/UploadToCPAN'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::MakeMaker
config:
Dist::Zilla::Role::TestRunner:
default_jobs: 9
name: '@RJBS/MakeMaker'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::AutoPrereqs
name: '@RJBS/AutoPrereqs'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::Git::NextVersion
config:
@@ -158,23 +158,23 @@ x_Dist_Zilla:
Dist::Zilla::Role::Git::Repo:
repo_root: .
name: '@RJBS/Git::NextVersion'
- version: '2.028'
+ version: '2.029'
-
class: Dist::Zilla::Plugin::PkgVersion
name: '@RJBS/PkgVersion'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@RJBS/MetaConfig'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@RJBS/MetaJSON'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::NextRelease
name: '@RJBS/NextRelease'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::Test::ChangesHasContent
name: '@RJBS/Test::ChangesHasContent'
@@ -182,11 +182,11 @@ x_Dist_Zilla:
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@RJBS/PodSyntaxTests'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::Test::ReportPrereqs
name: '@RJBS/Test::ReportPrereqs'
- version: '0.019'
+ version: '0.020'
-
class: Dist::Zilla::Plugin::Prereqs
config:
@@ -194,7 +194,7 @@ x_Dist_Zilla:
phase: test
type: requires
name: '@RJBS/TestMoreWithSubtests'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::PodWeaver
config:
@@ -208,75 +208,75 @@ x_Dist_Zilla:
-
class: Pod::Weaver::Plugin::EnsurePod5
name: '@CorePrep/EnsurePod5'
- version: '4.009'
+ version: '4.010'
-
class: Pod::Weaver::Plugin::H1Nester
name: '@CorePrep/H1Nester'
- version: '4.009'
+ version: '4.010'
-
class: Pod::Weaver::Plugin::SingleEncoding
name: '@RJBS/SingleEncoding'
- version: '4.009'
+ version: '4.010'
-
class: Pod::Weaver::Section::Name
name: '@RJBS/Name'
- version: '4.009'
+ version: '4.010'
-
class: Pod::Weaver::Section::Version
name: '@RJBS/Version'
- version: '4.009'
+ version: '4.010'
-
class: Pod::Weaver::Section::Region
name: '@RJBS/Prelude'
- version: '4.009'
+ version: '4.010'
-
class: Pod::Weaver::Section::Generic
name: '@RJBS/Synopsis'
- version: '4.009'
+ version: '4.010'
-
class: Pod::Weaver::Section::Generic
name: '@RJBS/Description'
- version: '4.009'
+ version: '4.010'
-
class: Pod::Weaver::Section::Generic
name: '@RJBS/Overview'
- version: '4.009'
+ version: '4.010'
-
class: Pod::Weaver::Section::Generic
name: '@RJBS/Stability'
- version: '4.009'
+ version: '4.010'
-
class: Pod::Weaver::Section::Collect
name: Attributes
- version: '4.009'
+ version: '4.010'
-
class: Pod::Weaver::Section::Collect
name: Methods
- version: '4.009'
+ version: '4.010'
-
class: Pod::Weaver::Section::Collect
name: Functions
- version: '4.009'
+ version: '4.010'
-
class: Pod::Weaver::Section::Leftovers
name: '@RJBS/Leftovers'
- version: '4.009'
+ version: '4.010'
-
class: Pod::Weaver::Section::Region
name: '@RJBS/postlude'
- version: '4.009'
+ version: '4.010'
-
class: Pod::Weaver::Section::Authors
name: '@RJBS/Authors'
- version: '4.009'
+ version: '4.010'
-
class: Pod::Weaver::Section::Legal
name: '@RJBS/Legal'
- version: '4.009'
+ version: '4.010'
-
class: Pod::Weaver::Plugin::Transformer
name: '@RJBS/List'
- version: '4.009'
+ version: '4.010'
name: '@RJBS/PodWeaver'
version: '4.006'
-
@@ -297,7 +297,7 @@ x_Dist_Zilla:
Dist::Zilla::Role::Git::Repo:
repo_root: .
name: '@RJBS/@Git/Check'
- version: '2.028'
+ version: '2.029'
-
class: Dist::Zilla::Plugin::Git::Commit
config:
@@ -314,21 +314,21 @@ x_Dist_Zilla:
Dist::Zilla::Role::Git::Repo:
repo_root: .
name: '@RJBS/@Git/Commit'
- version: '2.028'
+ version: '2.029'
-
class: Dist::Zilla::Plugin::Git::Tag
config:
Dist::Zilla::Plugin::Git::Tag:
branch: ~
signed: 0
- tag: '1.928'
+ tag: '1.929'
tag_format: '%v'
tag_message: v%v
time_zone: local
Dist::Zilla::Role::Git::Repo:
repo_root: .
name: '@RJBS/@Git/Tag'
- version: '2.028'
+ version: '2.029'
-
class: Dist::Zilla::Plugin::Git::Push
config:
@@ -340,7 +340,7 @@ x_Dist_Zilla:
Dist::Zilla::Role::Git::Repo:
repo_root: .
name: '@RJBS/@Git/Push'
- version: '2.028'
+ version: '2.029'
-
class: Dist::Zilla::Plugin::Prereqs
config:
@@ -348,45 +348,45 @@ x_Dist_Zilla:
phase: runtime
type: requires
name: Prereqs
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::Encoding
name: Encoding
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':IncModules'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':MainModule'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':AllFiles'
- version: '5.029'
+ version: '5.031'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':NoFiles'
- version: '5.029'
+ version: '5.031'
zilla:
class: Dist::Zilla::Dist::Builder
config:
is_trial: '0'
- version: '5.029'
+ version: '5.031'
@@ -1,5 +1,5 @@
-# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.029.
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.031.
use strict;
use warnings;
@@ -44,7 +44,7 @@ my %WriteMakefileArgs = (
"Test::More" => "0.96",
"utf8" => 0
},
- "VERSION" => "1.928",
+ "VERSION" => "1.929",
"test" => {
"TESTS" => "t/*.t"
}
@@ -1,7 +1,7 @@
This archive contains the distribution Email-MIME,
-version 1.928:
+version 1.929:
easy MIME message handling
@@ -11,5 +11,5 @@ This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
-This README file was generated by Dist::Zilla::Plugin::Readme v5.029.
+This README file was generated by Dist::Zilla::Plugin::Readme v5.031.
@@ -3,7 +3,7 @@ use strict;
use warnings;
package Email::MIME::Creator;
# ABSTRACT: obsolete do-nothing library
-$Email::MIME::Creator::VERSION = '1.928';
+$Email::MIME::Creator::VERSION = '1.929';
use parent q[Email::Simple::Creator];
use Email::MIME;
use Encode ();
@@ -44,7 +44,7 @@ Email::MIME::Creator - obsolete do-nothing library
=head1 VERSION
-version 1.928
+version 1.929
=head1 SYNOPSIS
@@ -2,7 +2,7 @@ use strict;
use warnings;
package Email::MIME::Encode;
# ABSTRACT: a private helper for MIME header encoding
-$Email::MIME::Encode::VERSION = '1.928';
+$Email::MIME::Encode::VERSION = '1.929';
use Email::Address;
use Encode ();
use MIME::Base64();
@@ -132,7 +132,7 @@ Email::MIME::Encode - a private helper for MIME header encoding
=head1 VERSION
-version 1.928
+version 1.929
=head1 AUTHORS
@@ -2,7 +2,7 @@ use strict;
use warnings;
package Email::MIME::Header;
# ABSTRACT: the header of a MIME message
-$Email::MIME::Header::VERSION = '1.928';
+$Email::MIME::Header::VERSION = '1.929';
use parent 'Email::Simple::Header';
use Email::MIME::Encode;
@@ -101,7 +101,7 @@ Email::MIME::Header - the header of a MIME message
=head1 VERSION
-version 1.928
+version 1.929
=head1 DESCRIPTION
@@ -2,7 +2,7 @@ use strict;
use warnings;
package Email::MIME::Modifier;
# ABSTRACT: obsolete do-nothing library
-$Email::MIME::Modifier::VERSION = '1.928';
+$Email::MIME::Modifier::VERSION = '1.929';
1;
__END__
@@ -17,7 +17,7 @@ Email::MIME::Modifier - obsolete do-nothing library
=head1 VERSION
-version 1.928
+version 1.929
=head1 AUTHORS
@@ -3,7 +3,7 @@ use strict;
use warnings;
package Email::MIME;
# ABSTRACT: easy MIME message handling
-$Email::MIME::VERSION = '1.928';
+$Email::MIME::VERSION = '1.929';
use Email::Simple 2.102; # crlf handling
use parent qw(Email::Simple);
@@ -169,6 +169,12 @@ sub new {
#pod
#pod =cut
+my %CT_SETTER = map {; $_ => 1 } qw(
+ content_type charset name format boundary
+ encoding
+ disposition filename
+);
+
sub create {
my ($class, %args) = @_;
@@ -218,13 +224,8 @@ sub create {
my $email = $class->new($header);
- foreach (qw(
- content_type charset name format boundary
- encoding
- disposition filename
- )) {
- my $set = "$_\_set";
- $email->$set($attrs{$_}) if exists $attrs{$_};
+ for my $key (keys %attrs) {
+ $email->content_type_attribute_set($key => $attrs{$key});
}
my $body_args = grep { defined $args{$_} } qw(parts body body_str);
@@ -512,6 +513,30 @@ sub boundary_set {
$self->parts_set([ $self->parts ]) if $self->parts > 1;
}
+sub content_type_attribute_set {
+ my ($self, $key, $value) = @_;
+ $key = lc $key;
+
+ if ($CT_SETTER{$key}) {
+ my $method = "$key\_set";
+ return $self->$method($value);
+ }
+
+ my $ct_header = parse_content_type($self->header('Content-Type'));
+ my $attrs = $ct_header->{attributes};
+
+ for my $existing_key (keys %$attrs) {
+ delete $attrs->{$existing_key} if lc $existing_key eq $key;
+ }
+
+ if ($value) {
+ $ct_header->{attributes}->{$key} = $value;
+ } else {
+ delete $ct_header->{attributes}->{$key};
+ }
+ $self->_compose_content_type($ct_header);
+}
+
#pod =method encoding_set
#pod
#pod $email->encoding_set( 'base64' );
@@ -553,7 +578,6 @@ sub body_set {
Carp::croak("provided body reference is not a scalar reference")
unless reftype($body) eq 'SCALAR';
$body_ref = $body;
- $body = $$body_ref;
} else {
$body_ref = \$body;
}
@@ -565,11 +589,11 @@ sub body_set {
# Simple subclasses were free to alter the guts of the Email::Simple
# object. -- rjbs, 2007-07-16
unless (((caller(1))[3] || '') eq 'Email::Simple::new') {
- $body = Email::MIME::Encodings::encode($enc, $body)
+ $$body_ref = Email::MIME::Encodings::encode($enc, $$body_ref)
unless !$enc || $enc =~ $NO_ENCODE_RE;
}
- $self->{body_raw} = $body;
+ $self->{body_raw} = $$body_ref;
$self->SUPER::body_set($body_ref);
}
@@ -824,7 +848,7 @@ Email::MIME - easy MIME message handling
=head1 VERSION
-version 1.928
+version 1.929
=head1 SYNOPSIS
@@ -3,7 +3,7 @@
use strict;
use warnings;
-# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.019
+# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.020
use Test::More tests => 1;
@@ -150,9 +150,16 @@ for my $phase ( qw(configure build test runtime develop other) ) {
my $ml = _max( map { length $_->[0] } @reports );
my $wl = _max( map { length $_->[1] } @reports );
my $hl = _max( map { length $_->[2] } @reports );
- splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl];
- push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports;
+ if ($type eq 'modules') {
+ splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl];
+ push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports;
+ }
+ else {
+ splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl];
+ push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports;
+ }
+
push @full_reports, "\n";
}
}
@@ -0,0 +1,34 @@
+use strict;
+use warnings;
+use Email::MIME;
+use Test::More;
+
+for my $ref (0,1) {
+ my $prefix = $ref ? 'ref' : 'str';
+
+ my $str = 'x' x 1024
+ . "\nI LIKE PIE\n"
+ . 'x' x 1024;
+
+ my $email = Email::MIME->create(
+ body => ($ref ? \$str : $str),
+ header => [ From => 'fred@example.com' ],
+ attributes => {
+ encoding => 'base64',
+ content_type => 'application/octet-stream',
+ invented => 'xyzzy',
+ },
+ );
+
+ cmp_ok(
+ length($email->as_string), '>=', 2048,
+ "$prefix: email is long enough"
+ );
+ isnt(index($email->body, 'I LIKE PIE'), -1, "$prefix: target string");
+
+ like($email->header('Content-Type'), qr/invented="xyzzy"/, "custom CT param");
+}
+
+done_testing;
+1;
+
@@ -1,6 +1,6 @@
use strict;
use warnings;
-use Test::More tests => 10;
+use Test::More tests => 12;
use_ok 'Email::MIME';
use_ok 'Email::MIME::Modifier';
@@ -78,3 +78,19 @@ is_deeply( parse_content_type($email->header('Content-Type')), {
},
}, 'ct with boundary worked' );
+$email->content_type_attribute_set( 'Bananas' => 'true' );
+
+is $email->header('Content-Type'),
+ 'text/plain; bananas="true"; boundary="marker"; format="flowed"; name="foo.txt"',
+ 'ct format is correct';
+
+is_deeply( parse_content_type($email->header('Content-Type')), {
+ ct(qw(text plain)),
+ attributes => {
+ bananas => 'true',
+ boundary => 'marker',
+ format => 'flowed',
+ name => 'foo.txt',
+ },
+}, 'ct with misc. attr (bananas) worked' );
+
@@ -4,7 +4,7 @@ use Test::More tests => 2;
note 'Checking Changes';
my $changes_file = 'Changes';
-my $newver = '1.928';
+my $newver = '1.929';
my $trial_token = '-TRIAL';
SKIP: {