@@ -1,5 +1,14 @@
Revision history for Perl extension Email::MIME.
+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
+ - update subparts in walk_parts if stringification changes
+
+1.927 2014-12-04 10:19:58-05:00 America/New_York
+ - add header_str_pairs; like header_pairs, but decoded
+ - remove Email:MIME::Creator from synopsis
+
1.926 2014-01-28 23:28:41-05:00 America/New_York
- improve EOL processing with quoted-printable (thanks, Tomohiro
Hosaka!)
@@ -22,7 +22,7 @@ This is free software, licensed under:
Version 1, February 1989
Copyright (C) 1989 Free Software Foundation, Inc.
- 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.012.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.029.
Changes
LICENSE
MANIFEST
@@ -12,7 +12,8 @@ lib/Email/MIME/Creator.pm
lib/Email/MIME/Encode.pm
lib/Email/MIME/Header.pm
lib/Email/MIME/Modifier.pm
-t/000-report-versions-tiny.t
+t/00-report-prereqs.dd
+t/00-report-prereqs.t
t/Mail/att-1.gif
t/Mail/mail-1
t/Mail/mail-2
@@ -6,7 +6,7 @@
"Simon Cozens <simon@cpan.org>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 5.012, CPAN::Meta::Converter version 2.133380",
+ "generated_by" : "Dist::Zilla version 5.029, CPAN::Meta::Converter version 2.143240",
"license" : [
"perl_5"
],
@@ -18,13 +18,12 @@
"prereqs" : {
"configure" : {
"requires" : {
- "ExtUtils::MakeMaker" : "6.30"
+ "ExtUtils::MakeMaker" : "0"
}
},
"develop" : {
"requires" : {
- "Test::Pod" : "1.41",
- "version" : "0.9901"
+ "Test::Pod" : "1.41"
}
},
"runtime" : {
@@ -48,7 +47,12 @@
}
},
"test" : {
+ "recommends" : {
+ "CPAN::Meta" : "2.120900"
+ },
"requires" : {
+ "ExtUtils::MakeMaker" : "0",
+ "File::Spec" : "0",
"Symbol" : "0",
"Test::More" : "0.96",
"utf8" : "0"
@@ -67,26 +71,43 @@
"web" : "https://github.com/rjbs/Email-MIME"
}
},
- "version" : "1.926",
+ "version" : "1.928",
"x_Dist_Zilla" : {
"perl" : {
- "version" : "5.018002"
+ "version" : "5.021005"
},
"plugins" : [
{
"class" : "Dist::Zilla::Plugin::Git::GatherDir",
+ "config" : {
+ "Dist::Zilla::Plugin::GatherDir" : {
+ "exclude_filename" : [],
+ "exclude_match" : [],
+ "follow_symlinks" : "0",
+ "include_dotfiles" : "0",
+ "prefix" : "",
+ "prune_directory" : [],
+ "root" : "."
+ },
+ "Dist::Zilla::Plugin::Git::GatherDir" : {
+ "include_untracked" : "0"
+ },
+ "Dist::Zilla::Role::Git::Repo" : {
+ "repo_root" : "."
+ }
+ },
"name" : "@RJBS/Git::GatherDir",
- "version" : "2.019"
+ "version" : "2.028"
},
{
"class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed",
"name" : "@RJBS/CheckPrereqsIndexed",
- "version" : "0.010"
+ "version" : "0.013"
},
{
"class" : "Dist::Zilla::Plugin::CheckExtraTests",
"name" : "@RJBS/CheckExtraTests",
- "version" : "0.016"
+ "version" : "0.025"
},
{
"class" : "Dist::Zilla::Plugin::PromptIfStale",
@@ -102,7 +123,7 @@
}
},
"name" : "@RJBS/RJBS-Outdated",
- "version" : "0.015"
+ "version" : "0.032"
},
{
"class" : "Dist::Zilla::Plugin::PromptIfStale",
@@ -116,112 +137,127 @@
}
},
"name" : "@RJBS/CPAN-Outdated",
- "version" : "0.015"
+ "version" : "0.032"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@RJBS/@Filter/PruneCruft",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::ManifestSkip",
"name" : "@RJBS/@Filter/ManifestSkip",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@RJBS/@Filter/MetaYAML",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@RJBS/@Filter/License",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::Readme",
"name" : "@RJBS/@Filter/Readme",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@RJBS/@Filter/ExecDir",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@RJBS/@Filter/ShareDir",
- "version" : "5.012"
- },
- {
- "class" : "Dist::Zilla::Plugin::MakeMaker",
- "name" : "@RJBS/@Filter/MakeMaker",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@RJBS/@Filter/Manifest",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@RJBS/@Filter/TestRelease",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@RJBS/@Filter/ConfirmRelease",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@RJBS/@Filter/UploadToCPAN",
- "version" : "5.012"
+ "version" : "5.029"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::MakeMaker",
+ "config" : {
+ "Dist::Zilla::Role::TestRunner" : {
+ "default_jobs" : 9
+ }
+ },
+ "name" : "@RJBS/MakeMaker",
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::AutoPrereqs",
"name" : "@RJBS/AutoPrereqs",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::Git::NextVersion",
+ "config" : {
+ "Dist::Zilla::Plugin::Git::NextVersion" : {
+ "first_version" : "0.001",
+ "version_by_branch" : "0",
+ "version_regexp" : "(?^:^([0-9]+\\.[0-9]+)$)"
+ },
+ "Dist::Zilla::Role::Git::Repo" : {
+ "repo_root" : "."
+ }
+ },
"name" : "@RJBS/Git::NextVersion",
- "version" : "2.019"
+ "version" : "2.028"
},
{
"class" : "Dist::Zilla::Plugin::PkgVersion",
"name" : "@RJBS/PkgVersion",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@RJBS/MetaConfig",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@RJBS/MetaJSON",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::NextRelease",
"name" : "@RJBS/NextRelease",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::Test::ChangesHasContent",
"name" : "@RJBS/Test::ChangesHasContent",
- "version" : "0.006"
+ "version" : "0.007"
},
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@RJBS/PodSyntaxTests",
- "version" : "5.012"
+ "version" : "5.029"
},
{
- "class" : "Dist::Zilla::Plugin::ReportVersions::Tiny",
- "name" : "@RJBS/ReportVersions::Tiny",
- "version" : "1.10"
+ "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs",
+ "name" : "@RJBS/Test::ReportPrereqs",
+ "version" : "0.019"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
@@ -232,7 +268,7 @@
}
},
"name" : "@RJBS/TestMoreWithSubtests",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::PodWeaver",
@@ -249,123 +285,182 @@
{
"class" : "Pod::Weaver::Plugin::EnsurePod5",
"name" : "@CorePrep/EnsurePod5",
- "version" : "4.006"
+ "version" : "4.009"
},
{
"class" : "Pod::Weaver::Plugin::H1Nester",
"name" : "@CorePrep/H1Nester",
- "version" : "4.006"
+ "version" : "4.009"
},
{
"class" : "Pod::Weaver::Plugin::SingleEncoding",
"name" : "@RJBS/SingleEncoding",
- "version" : "4.006"
+ "version" : "4.009"
},
{
"class" : "Pod::Weaver::Section::Name",
"name" : "@RJBS/Name",
- "version" : "4.006"
+ "version" : "4.009"
},
{
"class" : "Pod::Weaver::Section::Version",
"name" : "@RJBS/Version",
- "version" : "4.006"
+ "version" : "4.009"
},
{
"class" : "Pod::Weaver::Section::Region",
"name" : "@RJBS/Prelude",
- "version" : "4.006"
+ "version" : "4.009"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "@RJBS/Synopsis",
- "version" : "4.006"
+ "version" : "4.009"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "@RJBS/Description",
- "version" : "4.006"
+ "version" : "4.009"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "@RJBS/Overview",
- "version" : "4.006"
+ "version" : "4.009"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "@RJBS/Stability",
- "version" : "4.006"
+ "version" : "4.009"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "Attributes",
- "version" : "4.006"
+ "version" : "4.009"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "Methods",
- "version" : "4.006"
+ "version" : "4.009"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "Functions",
- "version" : "4.006"
+ "version" : "4.009"
},
{
"class" : "Pod::Weaver::Section::Leftovers",
"name" : "@RJBS/Leftovers",
- "version" : "4.006"
+ "version" : "4.009"
},
{
"class" : "Pod::Weaver::Section::Region",
"name" : "@RJBS/postlude",
- "version" : "4.006"
+ "version" : "4.009"
},
{
"class" : "Pod::Weaver::Section::Authors",
"name" : "@RJBS/Authors",
- "version" : "4.006"
+ "version" : "4.009"
},
{
"class" : "Pod::Weaver::Section::Legal",
"name" : "@RJBS/Legal",
- "version" : "4.006"
+ "version" : "4.009"
},
{
"class" : "Pod::Weaver::Plugin::Transformer",
"name" : "@RJBS/List",
- "version" : "4.006"
+ "version" : "4.009"
}
]
}
},
"name" : "@RJBS/PodWeaver",
- "version" : "4.005"
+ "version" : "4.006"
},
{
"class" : "Dist::Zilla::Plugin::GithubMeta",
"name" : "@RJBS/GithubMeta",
- "version" : "0.42"
+ "version" : "0.46"
},
{
"class" : "Dist::Zilla::Plugin::Git::Check",
+ "config" : {
+ "Dist::Zilla::Plugin::Git::Check" : {
+ "untracked_files" : "die"
+ },
+ "Dist::Zilla::Role::Git::DirtyFiles" : {
+ "allow_dirty" : [
+ "dist.ini",
+ "Changes"
+ ],
+ "allow_dirty_match" : [],
+ "changelog" : "Changes"
+ },
+ "Dist::Zilla::Role::Git::Repo" : {
+ "repo_root" : "."
+ }
+ },
"name" : "@RJBS/@Git/Check",
- "version" : "2.019"
+ "version" : "2.028"
},
{
"class" : "Dist::Zilla::Plugin::Git::Commit",
+ "config" : {
+ "Dist::Zilla::Plugin::Git::Commit" : {
+ "add_files_in" : [],
+ "commit_msg" : "v%v%n%n%c",
+ "time_zone" : "local"
+ },
+ "Dist::Zilla::Role::Git::DirtyFiles" : {
+ "allow_dirty" : [
+ "dist.ini",
+ "Changes"
+ ],
+ "allow_dirty_match" : [],
+ "changelog" : "Changes"
+ },
+ "Dist::Zilla::Role::Git::Repo" : {
+ "repo_root" : "."
+ }
+ },
"name" : "@RJBS/@Git/Commit",
- "version" : "2.019"
+ "version" : "2.028"
},
{
"class" : "Dist::Zilla::Plugin::Git::Tag",
+ "config" : {
+ "Dist::Zilla::Plugin::Git::Tag" : {
+ "branch" : null,
+ "signed" : 0,
+ "tag" : "1.928",
+ "tag_format" : "%v",
+ "tag_message" : "v%v",
+ "time_zone" : "local"
+ },
+ "Dist::Zilla::Role::Git::Repo" : {
+ "repo_root" : "."
+ }
+ },
"name" : "@RJBS/@Git/Tag",
- "version" : "2.019"
+ "version" : "2.028"
},
{
"class" : "Dist::Zilla::Plugin::Git::Push",
+ "config" : {
+ "Dist::Zilla::Plugin::Git::Push" : {
+ "push_to" : [
+ "origin :",
+ "github :"
+ ],
+ "remotes_must_exist" : 0
+ },
+ "Dist::Zilla::Role::Git::Repo" : {
+ "repo_root" : "."
+ }
+ },
"name" : "@RJBS/@Git/Push",
- "version" : "2.019"
+ "version" : "2.028"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
@@ -376,52 +471,52 @@
}
},
"name" : "Prereqs",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::Encoding",
"name" : "Encoding",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":IncModules",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":MainModule",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":AllFiles",
- "version" : "5.012"
+ "version" : "5.029"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":NoFiles",
- "version" : "5.012"
+ "version" : "5.029"
}
],
"zilla" : {
@@ -429,7 +524,7 @@
"config" : {
"is_trial" : "0"
},
- "version" : "5.012"
+ "version" : "5.029"
}
}
}
@@ -5,56 +5,71 @@ author:
- 'Casey West <casey@geeknest.com>'
- 'Simon Cozens <simon@cpan.org>'
build_requires:
- Symbol: 0
- Test::More: 0.96
- utf8: 0
+ ExtUtils::MakeMaker: '0'
+ File::Spec: '0'
+ Symbol: '0'
+ Test::More: '0.96'
+ utf8: '0'
configure_requires:
- ExtUtils::MakeMaker: 6.30
+ ExtUtils::MakeMaker: '0'
dynamic_config: 0
-generated_by: 'Dist::Zilla version 5.012, CPAN::Meta::Converter version 2.133380'
+generated_by: 'Dist::Zilla version 5.029, CPAN::Meta::Converter version 2.143240'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ version: '1.4'
name: Email-MIME
requires:
- Carp: 0
- Email::Address: 0
- Email::MIME::ContentType: 1.016
- Email::MIME::Encodings: 1.314
- Email::MessageID: 0
- Email::Simple: 2.102
- Email::Simple::Creator: 0
- Email::Simple::Header: 0
- Encode: 1.9801
- MIME::Base64: 0
- MIME::Types: 1.13
- Scalar::Util: 0
- parent: 0
- perl: 5.008001
- strict: 0
- warnings: 0
+ Carp: '0'
+ Email::Address: '0'
+ Email::MIME::ContentType: '1.016'
+ Email::MIME::Encodings: '1.314'
+ Email::MessageID: '0'
+ Email::Simple: '2.102'
+ Email::Simple::Creator: '0'
+ Email::Simple::Header: '0'
+ Encode: '1.9801'
+ MIME::Base64: '0'
+ MIME::Types: '1.13'
+ Scalar::Util: '0'
+ parent: '0'
+ perl: '5.008001'
+ strict: '0'
+ warnings: '0'
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.926
+version: '1.928'
x_Dist_Zilla:
perl:
- version: 5.018002
+ version: '5.021005'
plugins:
-
class: Dist::Zilla::Plugin::Git::GatherDir
+ config:
+ Dist::Zilla::Plugin::GatherDir:
+ exclude_filename: []
+ exclude_match: []
+ follow_symlinks: '0'
+ include_dotfiles: '0'
+ prefix: ''
+ prune_directory: []
+ root: .
+ Dist::Zilla::Plugin::Git::GatherDir:
+ include_untracked: '0'
+ Dist::Zilla::Role::Git::Repo:
+ repo_root: .
name: '@RJBS/Git::GatherDir'
- version: 2.019
+ version: '2.028'
-
class: Dist::Zilla::Plugin::CheckPrereqsIndexed
name: '@RJBS/CheckPrereqsIndexed'
- version: 0.010
+ version: '0.013'
-
class: Dist::Zilla::Plugin::CheckExtraTests
name: '@RJBS/CheckExtraTests'
- version: 0.016
+ version: '0.025'
-
class: Dist::Zilla::Plugin::PromptIfStale
config:
@@ -66,102 +81,112 @@ x_Dist_Zilla:
phase: build
skip: []
name: '@RJBS/RJBS-Outdated'
- version: 0.015
+ version: '0.032'
-
class: Dist::Zilla::Plugin::PromptIfStale
config:
Dist::Zilla::Plugin::PromptIfStale:
- check_all_plugins: 1
+ check_all_plugins: '1'
check_all_prereqs: 0
modules: []
phase: release
skip: []
name: '@RJBS/CPAN-Outdated'
- version: 0.015
+ version: '0.032'
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@RJBS/@Filter/PruneCruft'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::ManifestSkip
name: '@RJBS/@Filter/ManifestSkip'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@RJBS/@Filter/MetaYAML'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::License
name: '@RJBS/@Filter/License'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::Readme
name: '@RJBS/@Filter/Readme'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::ExecDir
name: '@RJBS/@Filter/ExecDir'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::ShareDir
name: '@RJBS/@Filter/ShareDir'
- version: 5.012
- -
- class: Dist::Zilla::Plugin::MakeMaker
- name: '@RJBS/@Filter/MakeMaker'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::Manifest
name: '@RJBS/@Filter/Manifest'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::TestRelease
name: '@RJBS/@Filter/TestRelease'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@RJBS/@Filter/ConfirmRelease'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@RJBS/@Filter/UploadToCPAN'
- version: 5.012
+ version: '5.029'
+ -
+ class: Dist::Zilla::Plugin::MakeMaker
+ config:
+ Dist::Zilla::Role::TestRunner:
+ default_jobs: 9
+ name: '@RJBS/MakeMaker'
+ version: '5.029'
-
class: Dist::Zilla::Plugin::AutoPrereqs
name: '@RJBS/AutoPrereqs'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::Git::NextVersion
+ config:
+ Dist::Zilla::Plugin::Git::NextVersion:
+ first_version: '0.001'
+ version_by_branch: '0'
+ version_regexp: (?^:^([0-9]+\.[0-9]+)$)
+ Dist::Zilla::Role::Git::Repo:
+ repo_root: .
name: '@RJBS/Git::NextVersion'
- version: 2.019
+ version: '2.028'
-
class: Dist::Zilla::Plugin::PkgVersion
name: '@RJBS/PkgVersion'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@RJBS/MetaConfig'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@RJBS/MetaJSON'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::NextRelease
name: '@RJBS/NextRelease'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::Test::ChangesHasContent
name: '@RJBS/Test::ChangesHasContent'
- version: 0.006
+ version: '0.007'
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@RJBS/PodSyntaxTests'
- version: 5.012
+ version: '5.029'
-
- class: Dist::Zilla::Plugin::ReportVersions::Tiny
- name: '@RJBS/ReportVersions::Tiny'
- version: 1.10
+ class: Dist::Zilla::Plugin::Test::ReportPrereqs
+ name: '@RJBS/Test::ReportPrereqs'
+ version: '0.019'
-
class: Dist::Zilla::Plugin::Prereqs
config:
@@ -169,7 +194,7 @@ x_Dist_Zilla:
phase: test
type: requires
name: '@RJBS/TestMoreWithSubtests'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::PodWeaver
config:
@@ -183,97 +208,139 @@ x_Dist_Zilla:
-
class: Pod::Weaver::Plugin::EnsurePod5
name: '@CorePrep/EnsurePod5'
- version: 4.006
+ version: '4.009'
-
class: Pod::Weaver::Plugin::H1Nester
name: '@CorePrep/H1Nester'
- version: 4.006
+ version: '4.009'
-
class: Pod::Weaver::Plugin::SingleEncoding
name: '@RJBS/SingleEncoding'
- version: 4.006
+ version: '4.009'
-
class: Pod::Weaver::Section::Name
name: '@RJBS/Name'
- version: 4.006
+ version: '4.009'
-
class: Pod::Weaver::Section::Version
name: '@RJBS/Version'
- version: 4.006
+ version: '4.009'
-
class: Pod::Weaver::Section::Region
name: '@RJBS/Prelude'
- version: 4.006
+ version: '4.009'
-
class: Pod::Weaver::Section::Generic
name: '@RJBS/Synopsis'
- version: 4.006
+ version: '4.009'
-
class: Pod::Weaver::Section::Generic
name: '@RJBS/Description'
- version: 4.006
+ version: '4.009'
-
class: Pod::Weaver::Section::Generic
name: '@RJBS/Overview'
- version: 4.006
+ version: '4.009'
-
class: Pod::Weaver::Section::Generic
name: '@RJBS/Stability'
- version: 4.006
+ version: '4.009'
-
class: Pod::Weaver::Section::Collect
name: Attributes
- version: 4.006
+ version: '4.009'
-
class: Pod::Weaver::Section::Collect
name: Methods
- version: 4.006
+ version: '4.009'
-
class: Pod::Weaver::Section::Collect
name: Functions
- version: 4.006
+ version: '4.009'
-
class: Pod::Weaver::Section::Leftovers
name: '@RJBS/Leftovers'
- version: 4.006
+ version: '4.009'
-
class: Pod::Weaver::Section::Region
name: '@RJBS/postlude'
- version: 4.006
+ version: '4.009'
-
class: Pod::Weaver::Section::Authors
name: '@RJBS/Authors'
- version: 4.006
+ version: '4.009'
-
class: Pod::Weaver::Section::Legal
name: '@RJBS/Legal'
- version: 4.006
+ version: '4.009'
-
class: Pod::Weaver::Plugin::Transformer
name: '@RJBS/List'
- version: 4.006
+ version: '4.009'
name: '@RJBS/PodWeaver'
- version: 4.005
+ version: '4.006'
-
class: Dist::Zilla::Plugin::GithubMeta
name: '@RJBS/GithubMeta'
- version: 0.42
+ version: '0.46'
-
class: Dist::Zilla::Plugin::Git::Check
+ config:
+ Dist::Zilla::Plugin::Git::Check:
+ untracked_files: die
+ Dist::Zilla::Role::Git::DirtyFiles:
+ allow_dirty:
+ - dist.ini
+ - Changes
+ allow_dirty_match: []
+ changelog: Changes
+ Dist::Zilla::Role::Git::Repo:
+ repo_root: .
name: '@RJBS/@Git/Check'
- version: 2.019
+ version: '2.028'
-
class: Dist::Zilla::Plugin::Git::Commit
+ config:
+ Dist::Zilla::Plugin::Git::Commit:
+ add_files_in: []
+ commit_msg: v%v%n%n%c
+ time_zone: local
+ Dist::Zilla::Role::Git::DirtyFiles:
+ allow_dirty:
+ - dist.ini
+ - Changes
+ allow_dirty_match: []
+ changelog: Changes
+ Dist::Zilla::Role::Git::Repo:
+ repo_root: .
name: '@RJBS/@Git/Commit'
- version: 2.019
+ version: '2.028'
-
class: Dist::Zilla::Plugin::Git::Tag
+ config:
+ Dist::Zilla::Plugin::Git::Tag:
+ branch: ~
+ signed: 0
+ tag: '1.928'
+ tag_format: '%v'
+ tag_message: v%v
+ time_zone: local
+ Dist::Zilla::Role::Git::Repo:
+ repo_root: .
name: '@RJBS/@Git/Tag'
- version: 2.019
+ version: '2.028'
-
class: Dist::Zilla::Plugin::Git::Push
+ config:
+ Dist::Zilla::Plugin::Git::Push:
+ push_to:
+ - 'origin :'
+ - 'github :'
+ remotes_must_exist: 0
+ Dist::Zilla::Role::Git::Repo:
+ repo_root: .
name: '@RJBS/@Git/Push'
- version: 2.019
+ version: '2.028'
-
class: Dist::Zilla::Plugin::Prereqs
config:
@@ -281,45 +348,45 @@ x_Dist_Zilla:
phase: runtime
type: requires
name: Prereqs
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::Encoding
name: Encoding
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':IncModules'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':MainModule'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':AllFiles'
- version: 5.012
+ version: '5.029'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':NoFiles'
- version: 5.012
+ version: '5.029'
zilla:
class: Dist::Zilla::Dist::Builder
config:
- is_trial: 0
- version: 5.012
+ is_trial: '0'
+ version: '5.029'
@@ -1,24 +1,24 @@
-# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.012.
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.029.
use strict;
use warnings;
use 5.008001;
-use ExtUtils::MakeMaker 6.30;
+use ExtUtils::MakeMaker;
my %WriteMakefileArgs = (
"ABSTRACT" => "easy MIME message handling",
"AUTHOR" => "Ricardo SIGNES <rjbs\@cpan.org>, Casey West <casey\@geeknest.com>, Simon Cozens <simon\@cpan.org>",
- "BUILD_REQUIRES" => {},
"CONFIGURE_REQUIRES" => {
- "ExtUtils::MakeMaker" => "6.30"
+ "ExtUtils::MakeMaker" => 0
},
"DISTNAME" => "Email-MIME",
"EXE_FILES" => [],
"LICENSE" => "perl",
+ "MIN_PERL_VERSION" => "5.008001",
"NAME" => "Email::MIME",
"PREREQ_PM" => {
"Carp" => 0,
@@ -38,11 +38,13 @@ my %WriteMakefileArgs = (
"warnings" => 0
},
"TEST_REQUIRES" => {
+ "ExtUtils::MakeMaker" => 0,
+ "File::Spec" => 0,
"Symbol" => 0,
"Test::More" => "0.96",
"utf8" => 0
},
- "VERSION" => "1.926",
+ "VERSION" => "1.928",
"test" => {
"TESTS" => "t/*.t"
}
@@ -59,6 +61,8 @@ my %FallbackPrereqs = (
"Email::Simple::Creator" => 0,
"Email::Simple::Header" => 0,
"Encode" => "1.9801",
+ "ExtUtils::MakeMaker" => 0,
+ "File::Spec" => 0,
"MIME::Base64" => 0,
"MIME::Types" => "1.13",
"Scalar::Util" => 0,
@@ -1,7 +1,7 @@
This archive contains the distribution Email-MIME,
-version 1.926:
+version 1.928:
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.012.
+This README file was generated by Dist::Zilla::Plugin::Readme v5.029.
@@ -3,7 +3,7 @@ use strict;
use warnings;
package Email::MIME::Creator;
# ABSTRACT: obsolete do-nothing library
-$Email::MIME::Creator::VERSION = '1.926';
+$Email::MIME::Creator::VERSION = '1.928';
use parent q[Email::Simple::Creator];
use Email::MIME;
use Encode ();
@@ -26,11 +26,11 @@ sub _construct_part {
1;
-# =head1 SYNOPSIS
-#
-# You don't need to use this module for anything.
-#
-# =cut
+#pod =head1 SYNOPSIS
+#pod
+#pod You don't need to use this module for anything.
+#pod
+#pod =cut
__END__
@@ -44,7 +44,7 @@ Email::MIME::Creator - obsolete do-nothing library
=head1 VERSION
-version 1.926
+version 1.928
=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.926';
+$Email::MIME::Encode::VERSION = '1.928';
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.926
+version 1.928
=head1 AUTHORS
@@ -2,43 +2,50 @@ use strict;
use warnings;
package Email::MIME::Header;
# ABSTRACT: the header of a MIME message
-$Email::MIME::Header::VERSION = '1.926';
+$Email::MIME::Header::VERSION = '1.928';
use parent 'Email::Simple::Header';
use Email::MIME::Encode;
use Encode 1.9801;
-# =head1 DESCRIPTION
-#
-# This object behaves like a standard Email::Simple header, with the following
-# changes:
-#
-# =for :list
-# * the C<header> method automatically decodes encoded headers if possible
-# * the C<header_raw> method returns the raw header; (read only for now)
-# * stringification uses C<header_raw> rather than C<header>
-#
-# Note that C<header_set> does not do encoding for you, and expects an
-# encoded header. Thus, C<header_set> round-trips with C<header_raw>,
-# not C<header>! Be sure to properly encode your headers with
-# C<Encode::encode('MIME-Header', $value)> before passing them to
-# C<header_set>.
-#
-# Alternately, if you have Unicode (character) strings to set in headers, use the
-# C<header_str_set> method.
-#
-# =cut
+#pod =head1 DESCRIPTION
+#pod
+#pod This object behaves like a standard Email::Simple header, with the following
+#pod changes:
+#pod
+#pod =for :list
+#pod * the C<header> method automatically decodes encoded headers if possible
+#pod * the C<header_raw> method returns the raw header; (read only for now)
+#pod * stringification uses C<header_raw> rather than C<header>
+#pod
+#pod Note that C<header_set> does not do encoding for you, and expects an
+#pod encoded header. Thus, C<header_set> round-trips with C<header_raw>,
+#pod not C<header>! Be sure to properly encode your headers with
+#pod C<Encode::encode('MIME-Header', $value)> before passing them to
+#pod C<header_set>.
+#pod
+#pod Alternately, if you have Unicode (character) strings to set in headers, use the
+#pod C<header_str_set> method.
+#pod
+#pod =cut
sub header {
- my $self = shift;
- my @header = $self->SUPER::header(@_);
+ my $self = shift;
+ my $wanta = wantarray;
+
+ return unless defined $wanta; # ??
+
+ my @header = $wanta ? $self->SUPER::header(@_)
+ : scalar $self->SUPER::header(@_);
+
local $@;
foreach my $header (@header) {
next unless defined $header;
next unless $header =~ /=\?/;
- $header = $self->_header_decode_str($header);
+
+ _maybe_decode(\$header);
}
- return wantarray ? (@header) : $header[0];
+ return $wanta ? @header : $header[0];
}
sub header_raw {
@@ -57,12 +64,27 @@ sub header_str_set {
$self->header_set($name => @values);
}
-sub _header_decode_str {
- my ($self, $str) = @_;
- my $new_str;
- $new_str = $str
- unless eval { $new_str = Encode::decode("MIME-Header", $str); 1 };
- return $new_str;
+sub header_str_pairs {
+ my ($self) = @_;
+
+ my @pairs = $self->header_pairs;
+ for (grep { $_ % 2 } (1 .. $#pairs)) {
+ _maybe_decode(\$pairs[$_]);
+ }
+
+ return @pairs;
+}
+
+sub _maybe_decode {
+ my ($str_ref) = @_;
+
+ # The eval is to cope with unknown encodings, like Latin-62, or other
+ # nonsense that gets put in there by spammers and weirdos
+ # -- rjbs, 2014-12-04
+ my $new;
+ $$str_ref = $new
+ if eval { $new = Encode::decode("MIME-Header", $$str_ref); 1 };
+ return;
}
1;
@@ -79,7 +101,7 @@ Email::MIME::Header - the header of a MIME message
=head1 VERSION
-version 1.926
+version 1.928
=head1 DESCRIPTION
@@ -2,7 +2,7 @@ use strict;
use warnings;
package Email::MIME::Modifier;
# ABSTRACT: obsolete do-nothing library
-$Email::MIME::Modifier::VERSION = '1.926';
+$Email::MIME::Modifier::VERSION = '1.928';
1;
__END__
@@ -17,7 +17,7 @@ Email::MIME::Modifier - obsolete do-nothing library
=head1 VERSION
-version 1.926
+version 1.928
=head1 AUTHORS
@@ -3,7 +3,7 @@ use strict;
use warnings;
package Email::MIME;
# ABSTRACT: easy MIME message handling
-$Email::MIME::VERSION = '1.926';
+$Email::MIME::VERSION = '1.928';
use Email::Simple 2.102; # crlf handling
use parent qw(Email::Simple);
@@ -18,98 +18,98 @@ use Email::MIME::Modifier;
use Encode 1.9801 ();
use Scalar::Util qw(reftype);
-# =head1 SYNOPSIS
-#
-# B<Wait!> Before you read this, maybe you just need L<Email::Stuffer>, which is
-# a much easier-to-use tool for building simple email messages that might have
-# attachments or both plain text and HTML. If that doesn't do it for you, then
-# by all means keep reading.
-#
-# use Email::MIME;
-# my $parsed = Email::MIME->new($message);
-#
-# my @parts = $parsed->parts; # These will be Email::MIME objects, too.
-# my $decoded = $parsed->body;
-# my $non_decoded = $parsed->body_raw;
-#
-# my $content_type = $parsed->content_type;
-#
-# ...or...
-#
-# use Email::MIME::Creator;
-# use IO::All;
-#
-# # multipart message
-# my @parts = (
-# Email::MIME->create(
-# attributes => {
-# filename => "report.pdf",
-# content_type => "application/pdf",
-# encoding => "quoted-printable",
-# name => "2004-financials.pdf",
-# },
-# body => io( "2004-financials.pdf" )->all,
-# ),
-# Email::MIME->create(
-# attributes => {
-# content_type => "text/plain",
-# disposition => "attachment",
-# charset => "US-ASCII",
-# },
-# body_str => "Hello there!",
-# ),
-# );
-#
-# my $email = Email::MIME->create(
-# header_str => [ From => 'casey@geeknest.com' ],
-# parts => [ @parts ],
-# );
-#
-# # nesting parts
-# $email->parts_set(
-# [
-# $email->parts,
-# Email::MIME->create( parts => [ @parts ] ),
-# ],
-# );
-#
-# # standard modifications
-# $email->header_str_set( 'X-PoweredBy' => 'RT v3.0' );
-# $email->header_str_set( To => rcpts() );
-# $email->header_str_set( Cc => aux_rcpts() );
-# $email->header_str_set( Bcc => sekrit_rcpts() );
-#
-# # more advanced
-# $_->encoding_set( 'base64' ) for $email->parts;
-#
-# # Quick multipart creation
-# my $quicky = Email::MIME->create(
-# header_str => [
-# From => 'my@address',
-# To => 'your@address',
-# ],
-# parts => [
-# q[This is part one],
-# q[This is part two],
-# q[These could be binary too],
-# ],
-# );
-#
-# print $email->as_string;
-#
-# =head1 DESCRIPTION
-#
-# This is an extension of the L<Email::Simple> module, to handle MIME
-# encoded messages. It takes a message as a string, splits it up into its
-# constituent parts, and allows you access to various parts of the
-# message. Headers are decoded from MIME encoding.
-#
-# =head1 METHODS
-#
-# Please see L<Email::Simple> for the base set of methods. It won't take
-# very long. Added to that, you have:
-#
-# =cut
+#pod =head1 SYNOPSIS
+#pod
+#pod B<Wait!> Before you read this, maybe you just need L<Email::Stuffer>, which is
+#pod a much easier-to-use tool for building simple email messages that might have
+#pod attachments or both plain text and HTML. If that doesn't do it for you, then
+#pod by all means keep reading.
+#pod
+#pod use Email::MIME;
+#pod my $parsed = Email::MIME->new($message);
+#pod
+#pod my @parts = $parsed->parts; # These will be Email::MIME objects, too.
+#pod my $decoded = $parsed->body;
+#pod my $non_decoded = $parsed->body_raw;
+#pod
+#pod my $content_type = $parsed->content_type;
+#pod
+#pod ...or...
+#pod
+#pod use Email::MIME;
+#pod use IO::All;
+#pod
+#pod # multipart message
+#pod my @parts = (
+#pod Email::MIME->create(
+#pod attributes => {
+#pod filename => "report.pdf",
+#pod content_type => "application/pdf",
+#pod encoding => "quoted-printable",
+#pod name => "2004-financials.pdf",
+#pod },
+#pod body => io( "2004-financials.pdf" )->binary->all,
+#pod ),
+#pod Email::MIME->create(
+#pod attributes => {
+#pod content_type => "text/plain",
+#pod disposition => "attachment",
+#pod charset => "US-ASCII",
+#pod },
+#pod body_str => "Hello there!",
+#pod ),
+#pod );
+#pod
+#pod my $email = Email::MIME->create(
+#pod header_str => [ From => 'casey@geeknest.com' ],
+#pod parts => [ @parts ],
+#pod );
+#pod
+#pod # nesting parts
+#pod $email->parts_set(
+#pod [
+#pod $email->parts,
+#pod Email::MIME->create( parts => [ @parts ] ),
+#pod ],
+#pod );
+#pod
+#pod # standard modifications
+#pod $email->header_str_set( 'X-PoweredBy' => 'RT v3.0' );
+#pod $email->header_str_set( To => rcpts() );
+#pod $email->header_str_set( Cc => aux_rcpts() );
+#pod $email->header_str_set( Bcc => sekrit_rcpts() );
+#pod
+#pod # more advanced
+#pod $_->encoding_set( 'base64' ) for $email->parts;
+#pod
+#pod # Quick multipart creation
+#pod my $quicky = Email::MIME->create(
+#pod header_str => [
+#pod From => 'my@address',
+#pod To => 'your@address',
+#pod ],
+#pod parts => [
+#pod q[This is part one],
+#pod q[This is part two],
+#pod q[These could be binary too],
+#pod ],
+#pod );
+#pod
+#pod print $email->as_string;
+#pod
+#pod =head1 DESCRIPTION
+#pod
+#pod This is an extension of the L<Email::Simple> module, to handle MIME
+#pod encoded messages. It takes a message as a string, splits it up into its
+#pod constituent parts, and allows you access to various parts of the
+#pod message. Headers are decoded from MIME encoding.
+#pod
+#pod =head1 METHODS
+#pod
+#pod Please see L<Email::Simple> for the base set of methods. It won't take
+#pod very long. Added to that, you have:
+#pod
+#pod =cut
our $CREATOR = 'Email::MIME::Creator';
@@ -125,49 +125,49 @@ sub new {
return $self;
}
-# =method create
-#
-# my $single = Email::MIME->create(
-# header_str => [ ... ],
-# body_str => '...',
-# attributes => { ... },
-# );
-#
-# my $multi = Email::MIME->create(
-# header_str => [ ... ],
-# parts => [ ... ],
-# attributes => { ... },
-# );
-#
-# This method creates a new MIME part. The C<header_str> parameter is a list of
-# headers pairs to include in the message. The value for each pair is expected to
-# be a text string that will be MIME-encoded as needed. A similar C<header>
-# parameter can be provided in addition to or instead of C<header_str>. Its
-# values will be used verbatim.
-#
-# C<attributes> is a hash of MIME attributes to assign to the part, and may
-# override portions of the header set in the C<header> parameter.
-#
-# The C<parts> parameter is a list reference containing C<Email::MIME>
-# objects. Elements of the C<parts> list can also be a non-reference
-# string of data. In that case, an C<Email::MIME> object will be created
-# for you. Simple checks will determine if the part is binary or not, and
-# all parts created in this fashion are encoded with C<base64>, just in case.
-#
-# If C<body> is given instead of C<parts>, it specifies the body to be used for a
-# flat (subpart-less) MIME message. It is assumed to be a sequence of octets.
-#
-# If C<body_str> is given instead of C<body> or C<parts>, it is assumed to be a
-# character string to be used as the body. If you provide a C<body_str>
-# parameter, you B<must> provide C<charset> and C<encoding> attributes.
-#
-# Back to C<attributes>. The hash keys correspond directly to methods or
-# modifying a message from C<Email::MIME::Modifier>. The allowed keys are:
-# content_type, charset, name, format, boundary, encoding, disposition,
-# and filename. They will be mapped to C<"$attr\_set"> for message
-# modification.
-#
-# =cut
+#pod =method create
+#pod
+#pod my $single = Email::MIME->create(
+#pod header_str => [ ... ],
+#pod body_str => '...',
+#pod attributes => { ... },
+#pod );
+#pod
+#pod my $multi = Email::MIME->create(
+#pod header_str => [ ... ],
+#pod parts => [ ... ],
+#pod attributes => { ... },
+#pod );
+#pod
+#pod This method creates a new MIME part. The C<header_str> parameter is a list of
+#pod headers pairs to include in the message. The value for each pair is expected to
+#pod be a text string that will be MIME-encoded as needed. A similar C<header>
+#pod parameter can be provided in addition to or instead of C<header_str>. Its
+#pod values will be used verbatim.
+#pod
+#pod C<attributes> is a hash of MIME attributes to assign to the part, and may
+#pod override portions of the header set in the C<header> parameter.
+#pod
+#pod The C<parts> parameter is a list reference containing C<Email::MIME>
+#pod objects. Elements of the C<parts> list can also be a non-reference
+#pod string of data. In that case, an C<Email::MIME> object will be created
+#pod for you. Simple checks will determine if the part is binary or not, and
+#pod all parts created in this fashion are encoded with C<base64>, just in case.
+#pod
+#pod If C<body> is given instead of C<parts>, it specifies the body to be used for a
+#pod flat (subpart-less) MIME message. It is assumed to be a sequence of octets.
+#pod
+#pod If C<body_str> is given instead of C<body> or C<parts>, it is assumed to be a
+#pod character string to be used as the body. If you provide a C<body_str>
+#pod parameter, you B<must> provide C<charset> and C<encoding> attributes.
+#pod
+#pod Back to C<attributes>. The hash keys correspond directly to methods or
+#pod modifying a message from C<Email::MIME::Modifier>. The allowed keys are:
+#pod content_type, charset, name, format, boundary, encoding, disposition,
+#pod and filename. They will be mapped to C<"$attr\_set"> for message
+#pod modification.
+#pod
+#pod =cut
sub create {
my ($class, %args) = @_;
@@ -437,14 +437,19 @@ sub header_str_set {
$self->header_obj->header_str_set(@_);
}
-# =method content_type_set
-#
-# $email->content_type_set( 'text/html' );
-#
-# Change the content type. All C<Content-Type> header attributes
-# will remain intact.
-#
-# =cut
+sub header_str_pairs {
+ my $self = shift;
+ $self->header_obj->header_str_pairs(@_);
+}
+
+#pod =method content_type_set
+#pod
+#pod $email->content_type_set( 'text/html' );
+#pod
+#pod Change the content type. All C<Content-Type> header attributes
+#pod will remain intact.
+#pod
+#pod =cut
sub content_type_set {
my ($self, $ct) = @_;
@@ -455,24 +460,24 @@ sub content_type_set {
return $ct;
}
-# =method charset_set
-#
-# =method name_set
-#
-# =method format_set
-#
-# =method boundary_set
-#
-# $email->charset_set( 'UTF-8' );
-# $email->name_set( 'some_filename.txt' );
-# $email->format_set( 'flowed' );
-# $email->boundary_set( undef ); # remove the boundary
-#
-# These four methods modify common C<Content-Type> attributes. If set to
-# C<undef>, the attribute is removed. All other C<Content-Type> header
-# information is preserved when modifying an attribute.
-#
-# =cut
+#pod =method charset_set
+#pod
+#pod =method name_set
+#pod
+#pod =method format_set
+#pod
+#pod =method boundary_set
+#pod
+#pod $email->charset_set( 'UTF-8' );
+#pod $email->name_set( 'some_filename.txt' );
+#pod $email->format_set( 'flowed' );
+#pod $email->boundary_set( undef ); # remove the boundary
+#pod
+#pod These four methods modify common C<Content-Type> attributes. If set to
+#pod C<undef>, the attribute is removed. All other C<Content-Type> header
+#pod information is preserved when modifying an attribute.
+#pod
+#pod =cut
BEGIN {
foreach my $attr (qw[charset name format]) {
@@ -507,18 +512,18 @@ sub boundary_set {
$self->parts_set([ $self->parts ]) if $self->parts > 1;
}
-# =method encoding_set
-#
-# $email->encoding_set( 'base64' );
-# $email->encoding_set( 'quoted-printable' );
-# $email->encoding_set( '8bit' );
-#
-# Convert the message body and alter the C<Content-Transfer-Encoding>
-# header using this method. Your message body, the output of the C<body()>
-# method, will remain the same. The raw body, output with the C<body_raw()>
-# method, will be changed to reflect the new encoding.
-#
-# =cut
+#pod =method encoding_set
+#pod
+#pod $email->encoding_set( 'base64' );
+#pod $email->encoding_set( 'quoted-printable' );
+#pod $email->encoding_set( '8bit' );
+#pod
+#pod Convert the message body and alter the C<Content-Transfer-Encoding>
+#pod header using this method. Your message body, the output of the C<body()>
+#pod method, will remain the same. The raw body, output with the C<body_raw()>
+#pod method, will be changed to reflect the new encoding.
+#pod
+#pod =cut
sub encoding_set {
my ($self, $enc) = @_;
@@ -528,17 +533,17 @@ sub encoding_set {
$self->body_set($body);
}
-# =method body_set
-#
-# $email->body_set( $unencoded_body_string );
-#
-# This method will encode the new body you send using the encoding
-# specified in the C<Content-Transfer-Encoding> header, then set
-# the body to the new encoded body.
-#
-# This method overrides the default C<body_set()> method.
-#
-# =cut
+#pod =method body_set
+#pod
+#pod $email->body_set( $unencoded_body_string );
+#pod
+#pod This method will encode the new body you send using the encoding
+#pod specified in the C<Content-Transfer-Encoding> header, then set
+#pod the body to the new encoded body.
+#pod
+#pod This method overrides the default C<body_set()> method.
+#pod
+#pod =cut
sub body_set {
my ($self, $body) = @_;
@@ -568,19 +573,19 @@ sub body_set {
$self->SUPER::body_set($body_ref);
}
-# =method body_str_set
-#
-# $email->body_str_set($unicode_str);
-#
-# This method behaves like C<body_set>, but assumes that the given value is a
-# Unicode string that should be encoded into the message's charset
-# before being set.
-#
-# The charset must already be set, either manually (via the C<attributes>
-# argument to C<create> or C<charset_set>) or through the C<Content-Type> of a
-# parsed message. If the charset can't be determined, an exception is thrown.
-#
-# =cut
+#pod =method body_str_set
+#pod
+#pod $email->body_str_set($unicode_str);
+#pod
+#pod This method behaves like C<body_set>, but assumes that the given value is a
+#pod Unicode string that should be encoded into the message's charset
+#pod before being set.
+#pod
+#pod The charset must already be set, either manually (via the C<attributes>
+#pod argument to C<create> or C<charset_set>) or through the C<Content-Type> of a
+#pod parsed message. If the charset can't be determined, an exception is thrown.
+#pod
+#pod =cut
sub body_str_set {
my ($self, $body_str) = @_;
@@ -593,14 +598,14 @@ sub body_str_set {
$self->body_set($body_octets);
}
-# =method disposition_set
-#
-# $email->disposition_set( 'attachment' );
-#
-# Alter the C<Content-Disposition> of a message. All header attributes
-# will remain intact.
-#
-# =cut
+#pod =method disposition_set
+#pod
+#pod $email->disposition_set( 'attachment' );
+#pod
+#pod Alter the C<Content-Disposition> of a message. All header attributes
+#pod will remain intact.
+#pod
+#pod =cut
sub disposition_set {
my ($self, $dis) = @_;
@@ -612,14 +617,14 @@ sub disposition_set {
$self->header_set('Content-Disposition' => $dis_header);
}
-# =method filename_set
-#
-# $email->filename_set( 'boo.pdf' );
-#
-# Sets the filename attribute in the C<Content-Disposition> header. All other
-# header information is preserved when setting this attribute.
-#
-# =cut
+#pod =method filename_set
+#pod
+#pod $email->filename_set( 'boo.pdf' );
+#pod
+#pod Sets the filename attribute in the C<Content-Disposition> header. All other
+#pod header information is preserved when setting this attribute.
+#pod
+#pod =cut
sub filename_set {
my ($self, $filename) = @_;
@@ -641,16 +646,16 @@ sub filename_set {
$self->header_set('Content-Disposition' => $dis);
}
-# =method parts_set
-#
-# $email->parts_set( \@new_parts );
-#
-# Replaces the parts for an object. Accepts a reference to a list of
-# C<Email::MIME> objects, representing the new parts. If this message was
-# originally a single part, the C<Content-Type> header will be changed to
-# C<multipart/mixed>, and given a new boundary attribute.
-#
-# =cut
+#pod =method parts_set
+#pod
+#pod $email->parts_set( \@new_parts );
+#pod
+#pod Replaces the parts for an object. Accepts a reference to a list of
+#pod C<Email::MIME> objects, representing the new parts. If this message was
+#pod originally a single part, the C<Content-Type> header will be changed to
+#pod C<multipart/mixed>, and given a new boundary attribute.
+#pod
+#pod =cut
sub parts_set {
my ($self, $parts) = @_;
@@ -670,6 +675,8 @@ sub parts_set {
$body .= "$self->{mycrlf}--$bound--$self->{mycrlf}";
@{$ct_header}{qw[type subtype]} = qw[multipart mixed]
unless grep { $ct_header->{type} eq $_ } qw[multipart message];
+ $self->encoding_set('7bit');
+ delete $ct_header->{attributes}{charset};
} elsif (@$parts == 1) { # setup singlepart
$body .= $parts->[0]->body;
@{$ct_header}{qw[type subtype]}
@@ -685,40 +692,40 @@ sub parts_set {
$self->_reset_cids;
}
-# =method parts_add
-#
-# $email->parts_add( \@more_parts );
-#
-# Adds MIME parts onto the current MIME part. This is a simple extension
-# of C<parts_set> to make our lives easier. It accepts an array reference
-# of additional parts.
-#
-# =cut
+#pod =method parts_add
+#pod
+#pod $email->parts_add( \@more_parts );
+#pod
+#pod Adds MIME parts onto the current MIME part. This is a simple extension
+#pod of C<parts_set> to make our lives easier. It accepts an array reference
+#pod of additional parts.
+#pod
+#pod =cut
sub parts_add {
my ($self, $parts) = @_;
$self->parts_set([ $self->parts, @{$parts}, ]);
}
-# =method walk_parts
-#
-# $email->walk_parts(sub {
-# my ($part) = @_;
-# return if $part->subparts; # multipart
-#
-# if ( $part->content_type =~ m[text/html]i ) {
-# my $body = $part->body;
-# $body =~ s/<link [^>]+>//; # simple filter example
-# $part->body_set( $body );
-# }
-# });
-#
-# Walks through all the MIME parts in a message and applies a callback to
-# each. Accepts a code reference as its only argument. The code reference
-# will be passed a single argument, the current MIME part within the
-# top-level MIME object. All changes will be applied in place.
-#
-# =cut
+#pod =method walk_parts
+#pod
+#pod $email->walk_parts(sub {
+#pod my ($part) = @_;
+#pod return if $part->subparts; # multipart
+#pod
+#pod if ( $part->content_type =~ m[text/html]i ) {
+#pod my $body = $part->body;
+#pod $body =~ s/<link [^>]+>//; # simple filter example
+#pod $part->body_set( $body );
+#pod }
+#pod });
+#pod
+#pod Walks through all the MIME parts in a message and applies a callback to
+#pod each. Accepts a code reference as its only argument. The code reference
+#pod will be passed a single argument, the current MIME part within the
+#pod top-level MIME object. All changes will be applied in place.
+#pod
+#pod =cut
sub walk_parts {
my ($self, $callback) = @_;
@@ -731,11 +738,20 @@ sub walk_parts {
$callback->($part);
if (my @orig_subparts = $part->subparts) {
- my @subparts = map {; $walk->($_) } @orig_subparts;
- my $differ
- = (@subparts != @orig_subparts)
- || (grep { $subparts[$_] != $orig_subparts[$_] } (0 .. $#subparts))
- || (grep { $changed{ 0+$subparts[$_] } } (0 .. $#subparts));
+ my $differ;
+ my @subparts;
+
+ for my $part (@orig_subparts) {
+ my $str = $part->as_string;
+ next unless my $new = $walk->($part);
+ $differ = 1 if $str ne $new->as_string;
+ push @subparts, $new;
+ }
+
+ $differ
+ ||= (@subparts != @orig_subparts)
+ || (grep { $subparts[$_] != $orig_subparts[$_] } (0 .. $#subparts))
+ || (grep { $changed{ 0+$subparts[$_] } } (0 .. $#subparts));
if ($differ) {
$part->parts_set(\@subparts);
@@ -808,7 +824,7 @@ Email::MIME - easy MIME message handling
=head1 VERSION
-version 1.926
+version 1.928
=head1 SYNOPSIS
@@ -828,7 +844,7 @@ by all means keep reading.
...or...
- use Email::MIME::Creator;
+ use Email::MIME;
use IO::All;
# multipart message
@@ -840,7 +856,7 @@ by all means keep reading.
encoding => "quoted-printable",
name => "2004-financials.pdf",
},
- body => io( "2004-financials.pdf" )->all,
+ body => io( "2004-financials.pdf" )->binary->all,
),
Email::MIME->create(
attributes => {
@@ -898,6 +914,9 @@ message. Headers are decoded from MIME encoding.
=head1 METHODS
+Please see L<Email::Simple> for the base set of methods. It won't take
+very long. Added to that, you have:
+
=head2 create
my $single = Email::MIME->create(
@@ -1054,6 +1073,13 @@ This behaves like C<header_set>, but expects Unicode (character) strings as the
values to set, rather than pre-encoded byte strings. It will encode them as
MIME encoded-words if they contain any control or 8-bit characters.
+=head2 header_str_pairs
+
+ my @pairs = $email->header_str_pairs;
+
+This method behaves like C<header_pairs>, returning a list of field name/value
+pairs, but the values have been decoded to character strings, when possible.
+
=head2 parts
This returns a list of C<Email::MIME> objects reflecting the parts of the
@@ -1129,11 +1155,6 @@ For example:
+ text/plain
+ text/html
-=head1 METHODS
-
-Please see L<Email::Simple> for the base set of methods. It won't take
-very long. Added to that, you have:
-
=head1 TODO
All of the Email::MIME-specific guts should move to a single entry on the
@@ -1179,102 +1200,109 @@ the same terms as the Perl 5 programming language system itself.
__END__
-# =method header_str_set
-#
-# $email->header_str_set($header_name => @value_strings);
-#
-# This behaves like C<header_set>, but expects Unicode (character) strings as the
-# values to set, rather than pre-encoded byte strings. It will encode them as
-# MIME encoded-words if they contain any control or 8-bit characters.
-#
-# =method parts
-#
-# This returns a list of C<Email::MIME> objects reflecting the parts of the
-# message. If it's a single-part message, you get the original object back.
-#
-# In scalar context, this method returns the number of parts.
-#
-# This is a stupid method. Don't use it.
-#
-# =method subparts
-#
-# This returns a list of C<Email::MIME> objects reflecting the parts of the
-# message. If it's a single-part message, this method returns an empty list.
-#
-# In scalar context, this method returns the number of subparts.
-#
-# =method body
-#
-# This decodes and returns the body of the object I<as a byte string>. For
-# top-level objects in multi-part messages, this is highly likely to be something
-# like "This is a multi-part message in MIME format."
-#
-# =method body_str
-#
-# This decodes both the Content-Transfer-Encoding layer of the body (like the
-# C<body> method) as well as the charset encoding of the body (unlike the C<body>
-# method), returning a Unicode string.
-#
-# If the charset is known, it is used. If there is no charset but the content
-# type is either C<text/plain> or C<text/html>, us-ascii is assumed. Otherwise,
-# an exception is thrown.
-#
-# =method body_raw
-#
-# This returns the body of the object, but doesn't decode the transfer encoding.
-#
-# =method decode_hook
-#
-# This method is called before the L<Email::MIME::Encodings> C<decode> method, to
-# decode the body of non-binary messages (or binary messages, if the
-# C<force_decode_hook> method returns true). By default, this method does
-# nothing, but subclasses may define behavior.
-#
-# This method could be used to implement the decryption of content in secure
-# email, for example.
-#
-# =method content_type
-#
-# This is a shortcut for access to the content type header.
-#
-# =method filename
-#
-# This provides the suggested filename for the attachment part. Normally
-# it will return the filename from the headers, but if C<filename> is
-# passed a true parameter, it will generate an appropriate "stable"
-# filename if one is not found in the MIME headers.
-#
-# =method invent_filename
-#
-# my $filename = Email::MIME->invent_filename($content_type);
-#
-# This routine is used by C<filename> to generate filenames for attached files.
-# It will attempt to choose a reasonable extension, falling back to F<dat>.
-#
-# =method debug_structure
-#
-# my $description = $email->debug_structure;
-#
-# This method returns a string that describes the structure of the MIME entity.
-# For example:
-#
-# + multipart/alternative; boundary="=_NextPart_2"; charset="BIG-5"
-# + text/plain
-# + text/html
-#
-# =head1 TODO
-#
-# All of the Email::MIME-specific guts should move to a single entry on the
-# object's guts. This will require changes to both Email::MIME and
-# L<Email::MIME::Modifier>, sadly.
-#
-# =head1 SEE ALSO
-#
-# L<Email::Simple>, L<Email::MIME::Modifier>, L<Email::MIME::Creator>.
-#
-# =head1 THANKS
-#
-# This module was generously sponsored by Best Practical
-# (http://www.bestpractical.com/), Pete Sergeant, and Pobox.com.
-#
-# =cut
+#pod =method header_str_set
+#pod
+#pod $email->header_str_set($header_name => @value_strings);
+#pod
+#pod This behaves like C<header_set>, but expects Unicode (character) strings as the
+#pod values to set, rather than pre-encoded byte strings. It will encode them as
+#pod MIME encoded-words if they contain any control or 8-bit characters.
+#pod
+#pod =method header_str_pairs
+#pod
+#pod my @pairs = $email->header_str_pairs;
+#pod
+#pod This method behaves like C<header_pairs>, returning a list of field name/value
+#pod pairs, but the values have been decoded to character strings, when possible.
+#pod
+#pod =method parts
+#pod
+#pod This returns a list of C<Email::MIME> objects reflecting the parts of the
+#pod message. If it's a single-part message, you get the original object back.
+#pod
+#pod In scalar context, this method returns the number of parts.
+#pod
+#pod This is a stupid method. Don't use it.
+#pod
+#pod =method subparts
+#pod
+#pod This returns a list of C<Email::MIME> objects reflecting the parts of the
+#pod message. If it's a single-part message, this method returns an empty list.
+#pod
+#pod In scalar context, this method returns the number of subparts.
+#pod
+#pod =method body
+#pod
+#pod This decodes and returns the body of the object I<as a byte string>. For
+#pod top-level objects in multi-part messages, this is highly likely to be something
+#pod like "This is a multi-part message in MIME format."
+#pod
+#pod =method body_str
+#pod
+#pod This decodes both the Content-Transfer-Encoding layer of the body (like the
+#pod C<body> method) as well as the charset encoding of the body (unlike the C<body>
+#pod method), returning a Unicode string.
+#pod
+#pod If the charset is known, it is used. If there is no charset but the content
+#pod type is either C<text/plain> or C<text/html>, us-ascii is assumed. Otherwise,
+#pod an exception is thrown.
+#pod
+#pod =method body_raw
+#pod
+#pod This returns the body of the object, but doesn't decode the transfer encoding.
+#pod
+#pod =method decode_hook
+#pod
+#pod This method is called before the L<Email::MIME::Encodings> C<decode> method, to
+#pod decode the body of non-binary messages (or binary messages, if the
+#pod C<force_decode_hook> method returns true). By default, this method does
+#pod nothing, but subclasses may define behavior.
+#pod
+#pod This method could be used to implement the decryption of content in secure
+#pod email, for example.
+#pod
+#pod =method content_type
+#pod
+#pod This is a shortcut for access to the content type header.
+#pod
+#pod =method filename
+#pod
+#pod This provides the suggested filename for the attachment part. Normally
+#pod it will return the filename from the headers, but if C<filename> is
+#pod passed a true parameter, it will generate an appropriate "stable"
+#pod filename if one is not found in the MIME headers.
+#pod
+#pod =method invent_filename
+#pod
+#pod my $filename = Email::MIME->invent_filename($content_type);
+#pod
+#pod This routine is used by C<filename> to generate filenames for attached files.
+#pod It will attempt to choose a reasonable extension, falling back to F<dat>.
+#pod
+#pod =method debug_structure
+#pod
+#pod my $description = $email->debug_structure;
+#pod
+#pod This method returns a string that describes the structure of the MIME entity.
+#pod For example:
+#pod
+#pod + multipart/alternative; boundary="=_NextPart_2"; charset="BIG-5"
+#pod + text/plain
+#pod + text/html
+#pod
+#pod =head1 TODO
+#pod
+#pod All of the Email::MIME-specific guts should move to a single entry on the
+#pod object's guts. This will require changes to both Email::MIME and
+#pod L<Email::MIME::Modifier>, sadly.
+#pod
+#pod =head1 SEE ALSO
+#pod
+#pod L<Email::Simple>, L<Email::MIME::Modifier>, L<Email::MIME::Creator>.
+#pod
+#pod =head1 THANKS
+#pod
+#pod This module was generously sponsored by Best Practical
+#pod (http://www.bestpractical.com/), Pete Sergeant, and Pobox.com.
+#pod
+#pod =cut
@@ -0,0 +1,46 @@
+do { my $x = {
+ 'configure' => {
+ 'requires' => {
+ 'ExtUtils::MakeMaker' => '0'
+ }
+ },
+ 'develop' => {
+ 'requires' => {
+ 'Test::Pod' => '1.41'
+ }
+ },
+ 'runtime' => {
+ 'requires' => {
+ 'Carp' => '0',
+ 'Email::Address' => '0',
+ 'Email::MIME::ContentType' => '1.016',
+ 'Email::MIME::Encodings' => '1.314',
+ 'Email::MessageID' => '0',
+ 'Email::Simple' => '2.102',
+ 'Email::Simple::Creator' => '0',
+ 'Email::Simple::Header' => '0',
+ 'Encode' => '1.9801',
+ 'MIME::Base64' => '0',
+ 'MIME::Types' => '1.13',
+ 'Scalar::Util' => '0',
+ 'parent' => '0',
+ 'perl' => '5.008001',
+ 'strict' => '0',
+ 'warnings' => '0'
+ }
+ },
+ 'test' => {
+ 'recommends' => {
+ 'CPAN::Meta' => '2.120900'
+ },
+ 'requires' => {
+ 'ExtUtils::MakeMaker' => '0',
+ 'File::Spec' => '0',
+ 'Symbol' => '0',
+ 'Test::More' => '0.96',
+ 'utf8' => '0'
+ }
+ }
+ };
+ $x;
+ }
\ No newline at end of file
@@ -0,0 +1,176 @@
+#!perl
+
+use strict;
+use warnings;
+
+# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.019
+
+use Test::More tests => 1;
+
+use ExtUtils::MakeMaker;
+use File::Spec;
+
+# from $version::LAX
+my $lax_version_re =
+ qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )?
+ |
+ (?:\.[0-9]+) (?:_[0-9]+)?
+ ) | (?:
+ v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )?
+ |
+ (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)?
+ )
+ )/x;
+
+# hide optional CPAN::Meta modules from prereq scanner
+# and check if they are available
+my $cpan_meta = "CPAN::Meta";
+my $cpan_meta_pre = "CPAN::Meta::Prereqs";
+my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic
+
+# Verify requirements?
+my $DO_VERIFY_PREREQS = 1;
+
+sub _max {
+ my $max = shift;
+ $max = ( $_ > $max ) ? $_ : $max for @_;
+ return $max;
+}
+
+sub _merge_prereqs {
+ my ($collector, $prereqs) = @_;
+
+ # CPAN::Meta::Prereqs object
+ if (ref $collector eq $cpan_meta_pre) {
+ return $collector->with_merged_prereqs(
+ CPAN::Meta::Prereqs->new( $prereqs )
+ );
+ }
+
+ # Raw hashrefs
+ for my $phase ( keys %$prereqs ) {
+ for my $type ( keys %{ $prereqs->{$phase} } ) {
+ for my $module ( keys %{ $prereqs->{$phase}{$type} } ) {
+ $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module};
+ }
+ }
+ }
+
+ return $collector;
+}
+
+my @include = qw(
+
+);
+
+my @exclude = qw(
+
+);
+
+# Add static prereqs to the included modules list
+my $static_prereqs = do 't/00-report-prereqs.dd';
+
+# Merge all prereqs (either with ::Prereqs or a hashref)
+my $full_prereqs = _merge_prereqs(
+ ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ),
+ $static_prereqs
+);
+
+# Add dynamic prereqs to the included modules list (if we can)
+my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml';
+if ( $source && $HAS_CPAN_META ) {
+ if ( my $meta = eval { CPAN::Meta->load_file($source) } ) {
+ $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs);
+ }
+}
+else {
+ $source = 'static metadata';
+}
+
+my @full_reports;
+my @dep_errors;
+my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs;
+
+# Add static includes into a fake section
+for my $mod (@include) {
+ $req_hash->{other}{modules}{$mod} = 0;
+}
+
+for my $phase ( qw(configure build test runtime develop other) ) {
+ next unless $req_hash->{$phase};
+ next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING});
+
+ for my $type ( qw(requires recommends suggests conflicts modules) ) {
+ next unless $req_hash->{$phase}{$type};
+
+ my $title = ucfirst($phase).' '.ucfirst($type);
+ my @reports = [qw/Module Want Have/];
+
+ for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) {
+ next if $mod eq 'perl';
+ next if grep { $_ eq $mod } @exclude;
+
+ my $file = $mod;
+ $file =~ s{::}{/}g;
+ $file .= ".pm";
+ my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC;
+
+ my $want = $req_hash->{$phase}{$type}{$mod};
+ $want = "undef" unless defined $want;
+ $want = "any" if !$want && $want == 0;
+
+ my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required";
+
+ if ($prefix) {
+ my $have = MM->parse_version( File::Spec->catfile($prefix, $file) );
+ $have = "undef" unless defined $have;
+ push @reports, [$mod, $want, $have];
+
+ if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) {
+ if ( $have !~ /\A$lax_version_re\z/ ) {
+ push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)";
+ }
+ elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) {
+ push @dep_errors, "$mod version '$have' is not in required range '$want'";
+ }
+ }
+ }
+ else {
+ push @reports, [$mod, $want, "missing"];
+
+ if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) {
+ push @dep_errors, "$mod is not installed ($req_string)";
+ }
+ }
+ }
+
+ if ( @reports ) {
+ push @full_reports, "=== $title ===\n\n";
+
+ 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;
+ push @full_reports, "\n";
+ }
+ }
+}
+
+if ( @full_reports ) {
+ diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports;
+}
+
+if ( @dep_errors ) {
+ diag join("\n",
+ "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n",
+ "The following REQUIRED prerequisites were not satisfied:\n",
+ @dep_errors,
+ "\n"
+ );
+}
+
+pass;
+
+# vim: ts=4 sts=4 sw=4 et:
@@ -1,88 +0,0 @@
-use strict;
-use warnings;
-use Test::More 0.88;
-# This is a relatively nice way to avoid Test::NoWarnings breaking our
-# expectations by adding extra tests, without using no_plan. It also helps
-# avoid any other test module that feels introducing random tests, or even
-# test plans, is a nice idea.
-our $success = 0;
-END { $success && done_testing; }
-
-# List our own version used to generate this
-my $v = "\nGenerated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.10\n";
-
-eval { # no excuses!
- # report our Perl details
- my $want = '5.008001';
- $v .= "perl: $] (wanted $want) on $^O from $^X\n\n";
-};
-defined($@) and diag("$@");
-
-# Now, our module version dependencies:
-sub pmver {
- my ($module, $wanted) = @_;
- $wanted = " (want $wanted)";
- my $pmver;
- eval "require $module;";
- if ($@) {
- if ($@ =~ m/Can't locate .* in \@INC/) {
- $pmver = 'module not found.';
- } else {
- diag("${module}: $@");
- $pmver = 'died during require.';
- }
- } else {
- my $version;
- eval { $version = $module->VERSION; };
- if ($@) {
- diag("${module}: $@");
- $pmver = 'died during VERSION check.';
- } elsif (defined $version) {
- $pmver = "$version";
- } else {
- $pmver = '<undef>';
- }
- }
-
- # So, we should be good, right?
- return sprintf('%-45s => %-10s%-15s%s', $module, $pmver, $wanted, "\n");
-}
-
-eval { $v .= pmver('Carp','any version') };
-eval { $v .= pmver('Email::Address','any version') };
-eval { $v .= pmver('Email::MIME::ContentType','1.016') };
-eval { $v .= pmver('Email::MIME::Encodings','1.314') };
-eval { $v .= pmver('Email::MessageID','any version') };
-eval { $v .= pmver('Email::Simple','2.102') };
-eval { $v .= pmver('Email::Simple::Creator','any version') };
-eval { $v .= pmver('Email::Simple::Header','any version') };
-eval { $v .= pmver('Encode','1.9801') };
-eval { $v .= pmver('ExtUtils::MakeMaker','6.30') };
-eval { $v .= pmver('MIME::Base64','any version') };
-eval { $v .= pmver('MIME::Types','1.13') };
-eval { $v .= pmver('Scalar::Util','any version') };
-eval { $v .= pmver('Symbol','any version') };
-eval { $v .= pmver('Test::More','0.96') };
-eval { $v .= pmver('parent','any version') };
-eval { $v .= pmver('strict','any version') };
-eval { $v .= pmver('utf8','any version') };
-eval { $v .= pmver('warnings','any version') };
-
-
-# All done.
-$v .= <<'EOT';
-
-Thanks for using my code. I hope it works for you.
-If not, please try and include this output in the bug report.
-That will help me reproduce the issue and solve your problem.
-
-EOT
-
-diag($v);
-ok(1, "we really didn't test anything, just reporting data");
-$success = 1;
-
-# Work around another nasty module on CPAN. :/
-no warnings 'once';
-$Template::Test::NO_FLUSH = 1;
-exit 0;
@@ -24,6 +24,13 @@ require_ok 'Email::MIME::Creator';
is($header[0], 'Julián', "1st header decodes to J...");
is($header[1], '=?UTF-8?B?SnVsacOhbg==?=', "2nd header decodes to =?..?=");
is($header[2], 'Julián', "3rd header decodes to J...");
+
+ my @pairs = $email->header_str_pairs;
+ my @idx = grep { $_ % 2 == 0 and $pairs[$_] eq 'Test' } (0..$#pairs);
+ is(@idx, 3, 'there are three entries for Test in header_str_pairs');
+ is($pairs[$idx[0]+1], 'Julián', "1st header decodes to J...");
+ is($pairs[$idx[1]+1], '=?UTF-8?B?SnVsacOhbg==?=', "2nd header decodes to =?..?=");
+ is($pairs[$idx[2]+1], 'Julián', "3rd header decodes to J...");
}
{
@@ -71,6 +71,14 @@ $email->walk_parts(sub {
});
like($email->as_string, qr/Part ONE/);
+my $new_text = 'DEERRRPP' ;
+$email->walk_parts(sub {
+ my $part = shift;
+ if ( ($part->content_type||'') =~ m[text/plain]i ) {
+ $part->body_set( $new_text );
+ }
+});
+like($email->as_string, qr/\Q$new_text\E/, 'set body from walk_parts');
done_testing;
__DATA__
@@ -4,7 +4,7 @@ use Test::More tests => 2;
note 'Checking Changes';
my $changes_file = 'Changes';
-my $newver = '1.926';
+my $newver = '1.928';
my $trial_token = '-TRIAL';
SKIP: {
@@ -1,8 +1,6 @@
#!perl
# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
use Test::More;
-
-eval "use Test::Pod 1.41";
-plan skip_all => "Test::Pod 1.41 required for testing POD" if $@;
+use Test::Pod 1.41;
all_pod_files_ok();