@@ -1,5 +1,18 @@
Release history for Email-Address
+1.903 2014-04-17 21:02:14-04:00 America/New_York
+ - correctly parenthesize false comment "0" (sigh)
+
+1.902 2014-04-17 10:45:11-04:00 America/New_York
+ - when formatting an address where phrase is empty but comment is not,
+ do not include "" for the phrase; just omit it
+ - when formatting and address where comment lacks enclosing parens, add
+ them
+
+1.901 2014-01-28 22:41:54-05:00 America/New_York
+ further avoidance of stringifying to undef (thanks, this time, to
+ David Golden)
+
1.900 2013-08-08 14:44:43 America/New_York
avoid trying to stringify undef, and so avoid a warning (thanks, Alex
Vandiver)
@@ -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,3 +1,4 @@
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.015.
Changes
LICENSE
MANIFEST
@@ -10,8 +11,7 @@ bench/ea-vs-ma.pl
bench/too_long.pl
dist.ini
lib/Email/Address.pm
-t/00-compile.t
-t/000-report-versions-tiny.t
+t/00-report-prereqs.t
t/ascii.t
t/cache-cow.t
t/comma-free.t
@@ -5,7 +5,7 @@
"Ricardo SIGNES <rjbs@cpan.org>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 4.300036, CPAN::Meta::Converter version 2.131560",
+ "generated_by" : "Dist::Zilla version 5.015, CPAN::Meta::Converter version 2.140640",
"license" : [
"perl_5"
],
@@ -22,8 +22,7 @@
},
"develop" : {
"requires" : {
- "Test::Pod" : "1.41",
- "version" : "0.9901"
+ "Test::Pod" : "1.41"
}
},
"runtime" : {
@@ -34,12 +33,18 @@
}
},
"test" : {
+ "recommends" : {
+ "CPAN::Meta" : "0",
+ "CPAN::Meta::Requirements" : "2.120900"
+ },
"requires" : {
- "Capture::Tiny" : "0",
"Encode" : "0",
"Encode::MIME::Header" : "0",
+ "ExtUtils::MakeMaker" : "0",
+ "File::Spec::Functions" : "0",
+ "List::Util" : "0",
"Test::More" : "0.96",
- "blib" : "0"
+ "version" : "0"
}
}
},
@@ -55,116 +60,169 @@
"web" : "https://github.com/rjbs/Email-Address"
}
},
- "version" : "1.900",
+ "version" : "1.903",
"x_Dist_Zilla" : {
"perl" : {
- "version" : "5.019002"
+ "version" : "5.019010"
},
"plugins" : [
{
"class" : "Dist::Zilla::Plugin::Git::GatherDir",
+ "config" : {
+ "Dist::Zilla::Plugin::Git::GatherDir" : {
+ "include_untracked" : "0"
+ },
+ "Dist::Zilla::Role::Git::Repo" : {
+ "repo_root" : "."
+ }
+ },
"name" : "@RJBS/Git::GatherDir",
- "version" : "2.014"
+ "version" : "2.021"
},
{
"class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed",
"name" : "@RJBS/CheckPrereqsIndexed",
- "version" : "0.009"
+ "version" : "0.011"
},
{
"class" : "Dist::Zilla::Plugin::CheckExtraTests",
"name" : "@RJBS/CheckExtraTests",
- "version" : "0.011"
+ "version" : "0.021"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::PromptIfStale",
+ "config" : {
+ "Dist::Zilla::Plugin::PromptIfStale" : {
+ "check_all_plugins" : 0,
+ "check_all_prereqs" : 0,
+ "modules" : [
+ "Dist::Zilla::PluginBundle::RJBS"
+ ],
+ "phase" : "build",
+ "skip" : []
+ }
+ },
+ "name" : "@RJBS/RJBS-Outdated",
+ "version" : "0.021"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::PromptIfStale",
+ "config" : {
+ "Dist::Zilla::Plugin::PromptIfStale" : {
+ "check_all_plugins" : "1",
+ "check_all_prereqs" : 0,
+ "modules" : [],
+ "phase" : "release",
+ "skip" : []
+ }
+ },
+ "name" : "@RJBS/CPAN-Outdated",
+ "version" : "0.021"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@RJBS/@Filter/PruneCruft",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
"class" : "Dist::Zilla::Plugin::ManifestSkip",
"name" : "@RJBS/@Filter/ManifestSkip",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@RJBS/@Filter/MetaYAML",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@RJBS/@Filter/License",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
"class" : "Dist::Zilla::Plugin::Readme",
"name" : "@RJBS/@Filter/Readme",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@RJBS/@Filter/ExecDir",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@RJBS/@Filter/ShareDir",
- "version" : "4.300036"
- },
- {
- "class" : "Dist::Zilla::Plugin::MakeMaker",
- "name" : "@RJBS/@Filter/MakeMaker",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@RJBS/@Filter/Manifest",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@RJBS/@Filter/TestRelease",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@RJBS/@Filter/ConfirmRelease",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@RJBS/@Filter/UploadToCPAN",
- "version" : "4.300036"
+ "version" : "5.015"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::MakeMaker",
+ "config" : {
+ "Dist::Zilla::Role::TestRunner" : {
+ "default_jobs" : 9
+ }
+ },
+ "name" : "@RJBS/MakeMaker",
+ "version" : "5.015"
},
{
"class" : "Dist::Zilla::Plugin::AutoPrereqs",
"name" : "@RJBS/AutoPrereqs",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
"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.014"
+ "version" : "2.021"
},
{
"class" : "Dist::Zilla::Plugin::PkgVersion",
"name" : "@RJBS/PkgVersion",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@RJBS/MetaConfig",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@RJBS/MetaJSON",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
"class" : "Dist::Zilla::Plugin::NextRelease",
"name" : "@RJBS/NextRelease",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
"class" : "Dist::Zilla::Plugin::Test::ChangesHasContent",
@@ -174,27 +232,12 @@
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@RJBS/PodSyntaxTests",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
- "class" : "Dist::Zilla::Plugin::Test::Compile",
- "config" : {
- "Dist::Zilla::Plugin::Test::Compile" : {
- "module_finder" : [
- ":InstallModules"
- ],
- "script_finder" : [
- ":ExecFiles"
- ]
- }
- },
- "name" : "@RJBS/Test::Compile",
- "version" : "2.014"
- },
- {
- "class" : "Dist::Zilla::Plugin::ReportVersions::Tiny",
- "name" : "@RJBS/ReportVersions::Tiny",
- "version" : "1.09"
+ "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs",
+ "name" : "@RJBS/Test::ReportPrereqs",
+ "version" : "0.013"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
@@ -205,67 +248,239 @@
}
},
"name" : "@RJBS/TestMoreWithSubtests",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
"class" : "Dist::Zilla::Plugin::PodWeaver",
+ "config" : {
+ "Dist::Zilla::Plugin::PodWeaver" : {
+ "config_plugins" : [
+ "@RJBS"
+ ],
+ "finder" : [
+ ":InstallModules",
+ ":ExecFiles"
+ ],
+ "plugins" : [
+ {
+ "class" : "Pod::Weaver::Plugin::EnsurePod5",
+ "name" : "@CorePrep/EnsurePod5",
+ "version" : "4.006"
+ },
+ {
+ "class" : "Pod::Weaver::Plugin::H1Nester",
+ "name" : "@CorePrep/H1Nester",
+ "version" : "4.006"
+ },
+ {
+ "class" : "Pod::Weaver::Plugin::SingleEncoding",
+ "name" : "@RJBS/SingleEncoding",
+ "version" : "4.006"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Name",
+ "name" : "@RJBS/Name",
+ "version" : "4.006"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Version",
+ "name" : "@RJBS/Version",
+ "version" : "4.006"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Region",
+ "name" : "@RJBS/Prelude",
+ "version" : "4.006"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Generic",
+ "name" : "@RJBS/Synopsis",
+ "version" : "4.006"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Generic",
+ "name" : "@RJBS/Description",
+ "version" : "4.006"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Generic",
+ "name" : "@RJBS/Overview",
+ "version" : "4.006"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Generic",
+ "name" : "@RJBS/Stability",
+ "version" : "4.006"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Collect",
+ "name" : "Attributes",
+ "version" : "4.006"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Collect",
+ "name" : "Methods",
+ "version" : "4.006"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Collect",
+ "name" : "Functions",
+ "version" : "4.006"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Leftovers",
+ "name" : "@RJBS/Leftovers",
+ "version" : "4.006"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Region",
+ "name" : "@RJBS/postlude",
+ "version" : "4.006"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Authors",
+ "name" : "@RJBS/Authors",
+ "version" : "4.006"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Legal",
+ "name" : "@RJBS/Legal",
+ "version" : "4.006"
+ },
+ {
+ "class" : "Pod::Weaver::Plugin::Transformer",
+ "name" : "@RJBS/List",
+ "version" : "4.006"
+ }
+ ]
+ }
+ },
"name" : "@RJBS/PodWeaver",
- "version" : "3.101642"
+ "version" : "4.005"
},
{
"class" : "Dist::Zilla::Plugin::GithubMeta",
"name" : "@RJBS/GithubMeta",
- "version" : "0.30"
+ "version" : "0.42"
},
{
"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.014"
+ "version" : "2.021"
},
{
"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.014"
+ "version" : "2.021"
},
{
"class" : "Dist::Zilla::Plugin::Git::Tag",
+ "config" : {
+ "Dist::Zilla::Plugin::Git::Tag" : {
+ "branch" : null,
+ "signed" : 0,
+ "tag" : "1.903",
+ "tag_format" : "%v",
+ "tag_message" : "v%v",
+ "time_zone" : "local"
+ },
+ "Dist::Zilla::Role::Git::Repo" : {
+ "repo_root" : "."
+ }
+ },
"name" : "@RJBS/@Git/Tag",
- "version" : "2.014"
+ "version" : "2.021"
},
{
"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.014"
+ "version" : "2.021"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":IncModules",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
- "version" : "4.300036"
+ "version" : "5.015"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":MainModule",
- "version" : "4.300036"
+ "version" : "5.015"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::FinderCode",
+ "name" : ":AllFiles",
+ "version" : "5.015"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::FinderCode",
+ "name" : ":NoFiles",
+ "version" : "5.015"
}
],
"zilla" : {
@@ -273,7 +488,7 @@
"config" : {
"is_trial" : "0"
},
- "version" : "4.300036"
+ "version" : "5.015"
}
}
}
@@ -4,139 +4,169 @@ author:
- 'Casey West'
- 'Ricardo SIGNES <rjbs@cpan.org>'
build_requires:
- Capture::Tiny: 0
- Encode: 0
- Encode::MIME::Header: 0
- Test::More: 0.96
- blib: 0
+ Encode: '0'
+ Encode::MIME::Header: '0'
+ ExtUtils::MakeMaker: '0'
+ File::Spec::Functions: '0'
+ List::Util: '0'
+ Test::More: '0.96'
+ version: '0'
configure_requires:
- ExtUtils::MakeMaker: 6.30
+ ExtUtils::MakeMaker: '6.30'
dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.300036, CPAN::Meta::Converter version 2.131560'
+generated_by: 'Dist::Zilla version 5.015, CPAN::Meta::Converter version 2.140640'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ version: '1.4'
name: Email-Address
requires:
- overload: 0
- strict: 0
- warnings: 0
+ overload: '0'
+ strict: '0'
+ warnings: '0'
resources:
bugtracker: https://github.com/rjbs/Email-Address/issues
homepage: https://github.com/rjbs/Email-Address
repository: https://github.com/rjbs/Email-Address.git
-version: 1.900
+version: '1.903'
x_Dist_Zilla:
perl:
- version: 5.019002
+ version: '5.019010'
plugins:
-
class: Dist::Zilla::Plugin::Git::GatherDir
+ config:
+ Dist::Zilla::Plugin::Git::GatherDir:
+ include_untracked: '0'
+ Dist::Zilla::Role::Git::Repo:
+ repo_root: .
name: '@RJBS/Git::GatherDir'
- version: 2.014
+ version: '2.021'
-
class: Dist::Zilla::Plugin::CheckPrereqsIndexed
name: '@RJBS/CheckPrereqsIndexed'
- version: 0.009
+ version: '0.011'
-
class: Dist::Zilla::Plugin::CheckExtraTests
name: '@RJBS/CheckExtraTests'
- version: 0.011
+ version: '0.021'
+ -
+ class: Dist::Zilla::Plugin::PromptIfStale
+ config:
+ Dist::Zilla::Plugin::PromptIfStale:
+ check_all_plugins: 0
+ check_all_prereqs: 0
+ modules:
+ - Dist::Zilla::PluginBundle::RJBS
+ phase: build
+ skip: []
+ name: '@RJBS/RJBS-Outdated'
+ version: '0.021'
+ -
+ class: Dist::Zilla::Plugin::PromptIfStale
+ config:
+ Dist::Zilla::Plugin::PromptIfStale:
+ check_all_plugins: '1'
+ check_all_prereqs: 0
+ modules: []
+ phase: release
+ skip: []
+ name: '@RJBS/CPAN-Outdated'
+ version: '0.021'
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@RJBS/@Filter/PruneCruft'
- version: 4.300036
+ version: '5.015'
-
class: Dist::Zilla::Plugin::ManifestSkip
name: '@RJBS/@Filter/ManifestSkip'
- version: 4.300036
+ version: '5.015'
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@RJBS/@Filter/MetaYAML'
- version: 4.300036
+ version: '5.015'
-
class: Dist::Zilla::Plugin::License
name: '@RJBS/@Filter/License'
- version: 4.300036
+ version: '5.015'
-
class: Dist::Zilla::Plugin::Readme
name: '@RJBS/@Filter/Readme'
- version: 4.300036
+ version: '5.015'
-
class: Dist::Zilla::Plugin::ExecDir
name: '@RJBS/@Filter/ExecDir'
- version: 4.300036
+ version: '5.015'
-
class: Dist::Zilla::Plugin::ShareDir
name: '@RJBS/@Filter/ShareDir'
- version: 4.300036
- -
- class: Dist::Zilla::Plugin::MakeMaker
- name: '@RJBS/@Filter/MakeMaker'
- version: 4.300036
+ version: '5.015'
-
class: Dist::Zilla::Plugin::Manifest
name: '@RJBS/@Filter/Manifest'
- version: 4.300036
+ version: '5.015'
-
class: Dist::Zilla::Plugin::TestRelease
name: '@RJBS/@Filter/TestRelease'
- version: 4.300036
+ version: '5.015'
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@RJBS/@Filter/ConfirmRelease'
- version: 4.300036
+ version: '5.015'
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@RJBS/@Filter/UploadToCPAN'
- version: 4.300036
+ version: '5.015'
+ -
+ class: Dist::Zilla::Plugin::MakeMaker
+ config:
+ Dist::Zilla::Role::TestRunner:
+ default_jobs: 9
+ name: '@RJBS/MakeMaker'
+ version: '5.015'
-
class: Dist::Zilla::Plugin::AutoPrereqs
name: '@RJBS/AutoPrereqs'
- version: 4.300036
+ version: '5.015'
-
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.014
+ version: '2.021'
-
class: Dist::Zilla::Plugin::PkgVersion
name: '@RJBS/PkgVersion'
- version: 4.300036
+ version: '5.015'
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@RJBS/MetaConfig'
- version: 4.300036
+ version: '5.015'
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@RJBS/MetaJSON'
- version: 4.300036
+ version: '5.015'
-
class: Dist::Zilla::Plugin::NextRelease
name: '@RJBS/NextRelease'
- version: 4.300036
+ version: '5.015'
-
class: Dist::Zilla::Plugin::Test::ChangesHasContent
name: '@RJBS/Test::ChangesHasContent'
- version: 0.006
+ version: '0.006'
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@RJBS/PodSyntaxTests'
- version: 4.300036
+ version: '5.015'
-
- class: Dist::Zilla::Plugin::Test::Compile
- config:
- Dist::Zilla::Plugin::Test::Compile:
- module_finder:
- - ':InstallModules'
- script_finder:
- - ':ExecFiles'
- name: '@RJBS/Test::Compile'
- version: 2.014
- -
- class: Dist::Zilla::Plugin::ReportVersions::Tiny
- name: '@RJBS/ReportVersions::Tiny'
- version: 1.09
+ class: Dist::Zilla::Plugin::Test::ReportPrereqs
+ name: '@RJBS/Test::ReportPrereqs'
+ version: '0.013'
-
class: Dist::Zilla::Plugin::Prereqs
config:
@@ -144,57 +174,187 @@ x_Dist_Zilla:
phase: test
type: requires
name: '@RJBS/TestMoreWithSubtests'
- version: 4.300036
+ version: '5.015'
-
class: Dist::Zilla::Plugin::PodWeaver
+ config:
+ Dist::Zilla::Plugin::PodWeaver:
+ config_plugins:
+ - '@RJBS'
+ finder:
+ - ':InstallModules'
+ - ':ExecFiles'
+ plugins:
+ -
+ class: Pod::Weaver::Plugin::EnsurePod5
+ name: '@CorePrep/EnsurePod5'
+ version: '4.006'
+ -
+ class: Pod::Weaver::Plugin::H1Nester
+ name: '@CorePrep/H1Nester'
+ version: '4.006'
+ -
+ class: Pod::Weaver::Plugin::SingleEncoding
+ name: '@RJBS/SingleEncoding'
+ version: '4.006'
+ -
+ class: Pod::Weaver::Section::Name
+ name: '@RJBS/Name'
+ version: '4.006'
+ -
+ class: Pod::Weaver::Section::Version
+ name: '@RJBS/Version'
+ version: '4.006'
+ -
+ class: Pod::Weaver::Section::Region
+ name: '@RJBS/Prelude'
+ version: '4.006'
+ -
+ class: Pod::Weaver::Section::Generic
+ name: '@RJBS/Synopsis'
+ version: '4.006'
+ -
+ class: Pod::Weaver::Section::Generic
+ name: '@RJBS/Description'
+ version: '4.006'
+ -
+ class: Pod::Weaver::Section::Generic
+ name: '@RJBS/Overview'
+ version: '4.006'
+ -
+ class: Pod::Weaver::Section::Generic
+ name: '@RJBS/Stability'
+ version: '4.006'
+ -
+ class: Pod::Weaver::Section::Collect
+ name: Attributes
+ version: '4.006'
+ -
+ class: Pod::Weaver::Section::Collect
+ name: Methods
+ version: '4.006'
+ -
+ class: Pod::Weaver::Section::Collect
+ name: Functions
+ version: '4.006'
+ -
+ class: Pod::Weaver::Section::Leftovers
+ name: '@RJBS/Leftovers'
+ version: '4.006'
+ -
+ class: Pod::Weaver::Section::Region
+ name: '@RJBS/postlude'
+ version: '4.006'
+ -
+ class: Pod::Weaver::Section::Authors
+ name: '@RJBS/Authors'
+ version: '4.006'
+ -
+ class: Pod::Weaver::Section::Legal
+ name: '@RJBS/Legal'
+ version: '4.006'
+ -
+ class: Pod::Weaver::Plugin::Transformer
+ name: '@RJBS/List'
+ version: '4.006'
name: '@RJBS/PodWeaver'
- version: 3.101642
+ version: '4.005'
-
class: Dist::Zilla::Plugin::GithubMeta
name: '@RJBS/GithubMeta'
- version: 0.30
+ version: '0.42'
-
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.014
+ version: '2.021'
-
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.014
+ version: '2.021'
-
class: Dist::Zilla::Plugin::Git::Tag
+ config:
+ Dist::Zilla::Plugin::Git::Tag:
+ branch: ~
+ signed: 0
+ tag: '1.903'
+ tag_format: '%v'
+ tag_message: v%v
+ time_zone: local
+ Dist::Zilla::Role::Git::Repo:
+ repo_root: .
name: '@RJBS/@Git/Tag'
- version: 2.014
+ version: '2.021'
-
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.014
+ version: '2.021'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
- version: 4.300036
+ version: '5.015'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':IncModules'
- version: 4.300036
+ version: '5.015'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
- version: 4.300036
+ version: '5.015'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
- version: 4.300036
+ version: '5.015'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
- version: 4.300036
+ version: '5.015'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':MainModule'
- version: 4.300036
+ version: '5.015'
+ -
+ class: Dist::Zilla::Plugin::FinderCode
+ name: ':AllFiles'
+ version: '5.015'
+ -
+ class: Dist::Zilla::Plugin::FinderCode
+ name: ':NoFiles'
+ version: '5.015'
zilla:
class: Dist::Zilla::Dist::Builder
config:
- is_trial: 0
- version: 4.300036
+ is_trial: '0'
+ version: '5.015'
@@ -1,4 +1,5 @@
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.015.
use strict;
use warnings;
@@ -20,48 +21,44 @@ my %WriteMakefileArgs = (
"LICENSE" => "perl",
"NAME" => "Email::Address",
"PREREQ_PM" => {
- "overload" => "0",
- "strict" => "0",
- "warnings" => "0"
+ "overload" => 0,
+ "strict" => 0,
+ "warnings" => 0
},
"TEST_REQUIRES" => {
- "Capture::Tiny" => "0",
- "Encode" => "0",
- "Encode::MIME::Header" => "0",
+ "Encode" => 0,
+ "Encode::MIME::Header" => 0,
+ "ExtUtils::MakeMaker" => 0,
+ "File::Spec::Functions" => 0,
+ "List::Util" => 0,
"Test::More" => "0.96",
- "blib" => "0"
+ "version" => 0
},
- "VERSION" => "1.900",
+ "VERSION" => "1.903",
"test" => {
"TESTS" => "t/*.t"
}
);
-unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
- my $tr = delete $WriteMakefileArgs{TEST_REQUIRES};
- my $br = $WriteMakefileArgs{BUILD_REQUIRES};
- for my $mod ( keys %$tr ) {
- if ( exists $br->{$mod} ) {
- $br->{$mod} = $tr->{$mod} if $tr->{$mod} > $br->{$mod};
- }
- else {
- $br->{$mod} = $tr->{$mod};
- }
- }
-}
+my %FallbackPrereqs = (
+ "Encode" => 0,
+ "Encode::MIME::Header" => 0,
+ "ExtUtils::MakeMaker" => 0,
+ "File::Spec::Functions" => 0,
+ "List::Util" => 0,
+ "Test::More" => "0.96",
+ "overload" => 0,
+ "strict" => 0,
+ "version" => 0,
+ "warnings" => 0
+);
-unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
- my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
- my $pp = $WriteMakefileArgs{PREREQ_PM};
- for my $mod ( keys %$br ) {
- if ( exists $pp->{$mod} ) {
- $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
- }
- else {
- $pp->{$mod} = $br->{$mod};
- }
- }
+
+unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
+ delete $WriteMakefileArgs{TEST_REQUIRES};
+ delete $WriteMakefileArgs{BUILD_REQUIRES};
+ $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
}
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
@@ -1,7 +1,7 @@
This archive contains the distribution Email-Address,
-version 1.900:
+version 1.903:
RFC 2822 Address Parsing and Creation
@@ -11,3 +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.015.
+
@@ -1,15 +1,33 @@
use strict;
use warnings;
package Email::Address;
-{
- $Email::Address::VERSION = '1.900';
-}
# ABSTRACT: RFC 2822 Address Parsing and Creation
-
+$Email::Address::VERSION = '1.903';
our $COMMENT_NEST_LEVEL ||= 2;
our $STRINGIFY ||= 'format';
our $COLLAPSE_SPACES = 1 unless defined $COLLAPSE_SPACES; # I miss //=
+#pod =head1 SYNOPSIS
+#pod
+#pod use Email::Address;
+#pod
+#pod my @addresses = Email::Address->parse($line);
+#pod my $address = Email::Address->new(Casey => 'casey@localhost');
+#pod
+#pod print $address->format;
+#pod
+#pod =head1 VERSION
+#pod
+#pod version 1.898
+#pod
+#pod =head1 DESCRIPTION
+#pod
+#pod This class implements a regex-based RFC 2822 parser that locates email
+#pod addresses in strings and returns a list of C<Email::Address> objects found.
+#pod Alternatively you may construct objects manually. The goal of this software is
+#pod to be correct, and very very fast.
+#pod
+#pod =cut
my $CTL = q{\x00-\x1F\x7F};
my $special = q{()<>\\[\\]:;@\\\\,."};
@@ -62,6 +80,52 @@ my $domain = qr/$dot_atom|$domain_literal/;
my $display_name = $phrase;
+#pod =head2 Package Variables
+#pod
+#pod B<ACHTUNG!> Email isn't easy (if even possible) to parse with a regex, I<at
+#pod least> if you're on a C<perl> prior to 5.10.0. Providing regular expressions
+#pod for use by other programs isn't a great idea, because it makes it hard to
+#pod improve the parser without breaking the "it's a regex" feature. Using these
+#pod regular expressions is not encouraged, and methods like C<<
+#pod Email::Address->is_addr_spec >> should be provided in the future.
+#pod
+#pod Several regular expressions used in this package are useful to others.
+#pod For convenience, these variables are declared as package variables that
+#pod you may access from your program.
+#pod
+#pod These regular expressions conform to the rules specified in RFC 2822.
+#pod
+#pod You can access these variables using the full namespace. If you want
+#pod short names, define them yourself.
+#pod
+#pod my $addr_spec = $Email::Address::addr_spec;
+#pod
+#pod =over 4
+#pod
+#pod =item $Email::Address::addr_spec
+#pod
+#pod This regular expression defined what an email address is allowed to
+#pod look like.
+#pod
+#pod =item $Email::Address::angle_addr
+#pod
+#pod This regular expression defines an C<$addr_spec> wrapped in angle
+#pod brackets.
+#pod
+#pod =item $Email::Address::name_addr
+#pod
+#pod This regular expression defines what an email address can look like
+#pod with an optional preceding display name, also known as the C<phrase>.
+#pod
+#pod =item $Email::Address::mailbox
+#pod
+#pod This is the complete regular expression defining an RFC 2822 email
+#pod address with an optional preceding display name and optional
+#pod following comment.
+#pod
+#pod =back
+#pod
+#pod =cut
our $addr_spec = qr/$local_part\@$domain/;
our $angle_addr = qr/$cfws*<$addr_spec>$cfws*/;
@@ -74,6 +138,40 @@ sub _COMMENT () { 2 }
sub _ORIGINAL () { 3 }
sub _IN_CACHE () { 4 }
+#pod =head2 Class Methods
+#pod
+#pod =over
+#pod
+#pod =item parse
+#pod
+#pod my @addrs = Email::Address->parse(
+#pod q[me@local, Casey <me@local>, "Casey" <me@local> (West)]
+#pod );
+#pod
+#pod This method returns a list of C<Email::Address> objects it finds in the input
+#pod string. B<Please note> that it returns a list, and expects that it may find
+#pod multiple addresses. The behavior in scalar context is undefined.
+#pod
+#pod The specification for an email address allows for infinitely nestable comments.
+#pod That's nice in theory, but a little over done. By default this module allows
+#pod for two (C<2>) levels of nested comments. If you think you need more, modify
+#pod the C<$Email::Address::COMMENT_NEST_LEVEL> package variable to allow more.
+#pod
+#pod $Email::Address::COMMENT_NEST_LEVEL = 10; # I'm deep
+#pod
+#pod The reason for this hardly-limiting limitation is simple: efficiency.
+#pod
+#pod Long strings of whitespace can be problematic for this module to parse, a bug
+#pod which has not yet been adequately addressed. The default behavior is now to
+#pod collapse multiple spaces into a single space, which avoids this problem. To
+#pod prevent this behavior, set C<$Email::Address::COLLAPSE_SPACES> to zero. This
+#pod variable will go away when the bug is resolved properly.
+#pod
+#pod In accordance with RFC 822 and its descendants, this module demands that email
+#pod addresses be ASCII only. Any non-ASCII content in the parsed addresses will
+#pod cause the parser to return no results.
+#pod
+#pod =cut
our (%PARSE_CACHE, %FORMAT_CACHE, %NAME_CACHE);
my $NOCACHE;
@@ -142,6 +240,18 @@ sub parse {
return @addrs;
}
+#pod =item new
+#pod
+#pod my $address = Email::Address->new(undef, 'casey@local');
+#pod my $address = Email::Address->new('Casey West', 'casey@local');
+#pod my $address = Email::Address->new(undef, 'casey@local', '(Casey)');
+#pod
+#pod Constructs and returns a new C<Email::Address> object. Takes four
+#pod positional arguments: phrase, email, and comment, and original string.
+#pod
+#pod The original string should only really be set using C<parse>.
+#pod
+#pod =cut
sub new {
my ($class, $phrase, $email, $comment, $orig) = @_;
@@ -150,6 +260,18 @@ sub new {
bless [ $phrase, $email, $comment, $orig ] => $class;
}
+#pod =item purge_cache
+#pod
+#pod Email::Address->purge_cache;
+#pod
+#pod One way this module stays fast is with internal caches. Caches live
+#pod in memory and there is the remote possibility that you will have a
+#pod memory problem. On the off chance that you think you're one of those
+#pod people, this class method will empty those caches.
+#pod
+#pod I've loaded over 12000 objects and not encountered a memory problem.
+#pod
+#pod =cut
sub purge_cache {
%NAME_CACHE = ();
@@ -157,6 +279,17 @@ sub purge_cache {
%PARSE_CACHE = ();
}
+#pod =item disable_cache
+#pod
+#pod =item enable_cache
+#pod
+#pod Email::Address->disable_cache if memory_low();
+#pod
+#pod If you'd rather not cache address parses at all, you can disable (and
+#pod re-enable) the Email::Address cache with these methods. The cache is enabled
+#pod by default.
+#pod
+#pod =cut
sub disable_cache {
my ($class) = @_;
@@ -168,6 +301,53 @@ sub enable_cache {
$NOCACHE = undef;
}
+#pod =back
+#pod
+#pod =head2 Instance Methods
+#pod
+#pod =over 4
+#pod
+#pod =item phrase
+#pod
+#pod my $phrase = $address->phrase;
+#pod $address->phrase( "Me oh my" );
+#pod
+#pod Accessor and mutator for the phrase portion of an address.
+#pod
+#pod =item address
+#pod
+#pod my $addr = $address->address;
+#pod $addr->address( "me@PROTECTED.com" );
+#pod
+#pod Accessor and mutator for the address portion of an address.
+#pod
+#pod =item comment
+#pod
+#pod my $comment = $address->comment;
+#pod $address->comment( "(Work address)" );
+#pod
+#pod Accessor and mutator for the comment portion of an address.
+#pod
+#pod =item original
+#pod
+#pod my $orig = $address->original;
+#pod
+#pod Accessor for the original address found when parsing, or passed
+#pod to C<new>.
+#pod
+#pod =item host
+#pod
+#pod my $host = $address->host;
+#pod
+#pod Accessor for the host portion of an address's address.
+#pod
+#pod =item user
+#pod
+#pod my $user = $address->user;
+#pod
+#pod Accessor for the user portion of an address's address.
+#pod
+#pod =cut
BEGIN {
my %_INDEX = (
@@ -199,6 +379,16 @@ BEGIN {
sub host { ($_[0]->[_ADDRESS] =~ /\@($domain)/o)[0] }
sub user { ($_[0]->[_ADDRESS] =~ /($local_part)\@/o)[0] }
+#pod =pod
+#pod
+#pod =item format
+#pod
+#pod my $printable = $address->format;
+#pod
+#pod Returns a properly formatted RFC 2822 address representing the
+#pod object.
+#pod
+#pod =cut
sub format {
my $cache_str = do { no warnings 'uninitialized'; "@{$_[0]}" };
@@ -214,13 +404,16 @@ sub _format {
||
defined $self->[_COMMENT] && length $self->[_COMMENT]
) {
- return $self->[_ADDRESS];
+ return defined $self->[_ADDRESS] ? $self->[_ADDRESS] : '';
}
+ my $comment = defined $self->[_COMMENT] ? $self->[_COMMENT] : '';
+ $comment = "($comment)" if length $comment and $comment !~ /\A\(.*\)\z/;
+
my $format = sprintf q{%s <%s> %s},
$self->_enquoted_phrase,
(defined $self->[_ADDRESS] ? $self->[_ADDRESS] : ''),
- (defined $self->[_COMMENT] ? $self->[_COMMENT] : '');
+ $comment;
$format =~ s/^\s+//;
$format =~ s/\s+$//;
@@ -233,7 +426,7 @@ sub _enquoted_phrase {
my $phrase = $self->[_PHRASE];
- return '' unless defined $phrase;
+ return '' unless defined $phrase and length $phrase;
# if it's encoded -- rjbs, 2007-02-28
return $phrase if $phrase =~ /\A=\?.+\?=\z/;
@@ -244,6 +437,20 @@ sub _enquoted_phrase {
return qq{"$phrase"};
}
+#pod =item name
+#pod
+#pod my $name = $address->name;
+#pod
+#pod This method tries very hard to determine the name belonging to the address.
+#pod First the C<phrase> is checked. If that doesn't work out the C<comment>
+#pod is looked into. If that still doesn't work out, the C<user> portion of
+#pod the C<address> is returned.
+#pod
+#pod This method does B<not> try to massage any name it identifies and instead
+#pod leaves that up to someone else. Who is it to decide if someone wants their
+#pod name capitalized, or if they're Irish?
+#pod
+#pod =cut
sub name {
my $cache_str = do { no warnings 'uninitialized'; "@{$_[0]}" };
@@ -266,6 +473,34 @@ sub name {
$NAME_CACHE{$cache_str} = $name;
}
+#pod =back
+#pod
+#pod =head2 Overloaded Operators
+#pod
+#pod =over 4
+#pod
+#pod =item stringify
+#pod
+#pod print "I have your email address, $address.";
+#pod
+#pod Objects stringify to C<format> by default. It's possible that you don't
+#pod like that idea. Okay, then, you can change it by modifying
+#pod C<$Email:Address::STRINGIFY>. Please consider modifying this package
+#pod variable using C<local>. You might step on someone else's toes if you
+#pod don't.
+#pod
+#pod {
+#pod local $Email::Address::STRINGIFY = 'host';
+#pod print "I have your address, $address.";
+#pod # geeknest.com
+#pod }
+#pod print "I have your address, $address.";
+#pod # "Casey West" <casey@geeknest.com>
+#pod
+#pod Modifying this package variable is now deprecated. Subclassing is now the
+#pod recommended approach.
+#pod
+#pod =cut
sub as_string {
warn 'altering $Email::Address::STRINGIFY is deprecated; subclass instead'
@@ -276,20 +511,25 @@ sub as_string {
use overload '""' => 'as_string', fallback => 1;
+#pod =pod
+#pod
+#pod =back
+#pod
+#pod =cut
1;
-__END__
-
=pod
+=encoding UTF-8
+
=head1 NAME
Email::Address - RFC 2822 Address Parsing and Creation
=head1 VERSION
-version 1.900
+version 1.903
=head1 SYNOPSIS
@@ -566,3 +806,36 @@ This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
+
+__END__
+
+#pod =head2 Did I Mention Fast?
+#pod
+#pod On his 1.8GHz Apple MacBook, rjbs gets these results:
+#pod
+#pod $ perl -Ilib bench/ea-vs-ma.pl bench/corpus.txt 5
+#pod Rate Mail::Address Email::Address
+#pod Mail::Address 2.59/s -- -44%
+#pod Email::Address 4.59/s 77% --
+#pod
+#pod $ perl -Ilib bench/ea-vs-ma.pl bench/corpus.txt 25
+#pod Rate Mail::Address Email::Address
+#pod Mail::Address 2.58/s -- -67%
+#pod Email::Address 7.84/s 204% --
+#pod
+#pod $ perl -Ilib bench/ea-vs-ma.pl bench/corpus.txt 50
+#pod Rate Mail::Address Email::Address
+#pod Mail::Address 2.57/s -- -70%
+#pod Email::Address 8.53/s 232% --
+#pod
+#pod ...unfortunately, a known bug causes a loss of speed the string to parse has
+#pod certain known characteristics, and disabling cache will also degrade
+#pod performance.
+#pod
+#pod =head1 ACKNOWLEDGEMENTS
+#pod
+#pod Thanks to Kevin Riggle and Tatsuhiko Miyagawa for tests for annoying
+#pod phrase-quoting bugs!
+#pod
+#pod =cut
+
@@ -1,39 +0,0 @@
-use strict;
-use warnings;
-
-# This test was generated via Dist::Zilla::Plugin::Test::Compile 2.014
-
-use Test::More 0.88;
-
-
-
-use Capture::Tiny qw{ capture };
-
-my @module_files = qw(
-Email/Address.pm
-);
-
-my @scripts = qw(
-
-);
-
-# no fake home requested
-
-my @warnings;
-for my $lib (@module_files)
-{
- my ($stdout, $stderr, $exit) = capture {
- system($^X, '-Mblib', '-e', qq{require qq[$lib]});
- };
- is($?, 0, "$lib loaded ok");
- warn $stderr if $stderr;
- push @warnings, $stderr if $stderr;
-}
-
-is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING};
-
-
-
-
-
-done_testing;
@@ -0,0 +1,170 @@
+#!perl
+
+use strict;
+use warnings;
+
+# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.013
+
+use Test::More tests => 1;
+
+use ExtUtils::MakeMaker;
+use File::Spec::Functions;
+use List::Util qw/max/;
+use version;
+
+# hide optional CPAN::Meta modules from prereq scanner
+# and check if they are available
+my $cpan_meta = "CPAN::Meta";
+my $cpan_meta_req = "CPAN::Meta::Requirements";
+my $HAS_CPAN_META = eval "require $cpan_meta"; ## no critic
+my $HAS_CPAN_META_REQ = eval "require $cpan_meta_req; $cpan_meta_req->VERSION('2.120900')";
+
+# Verify requirements?
+my $DO_VERIFY_PREREQS = 1;
+
+sub _merge_requires {
+ my ($collector, $prereqs) = @_;
+ for my $phase ( qw/configure build test runtime develop/ ) {
+ next unless exists $prereqs->{$phase};
+ if ( my $req = $prereqs->{$phase}{'requires'} ) {
+ my $cmr = CPAN::Meta::Requirements->from_string_hash( $req );
+ $collector->add_requirements( $cmr );
+ }
+ }
+}
+
+my %include = map {; $_ => 1 } qw(
+
+);
+
+my %exclude = map {; $_ => 1 } qw(
+
+);
+
+# Add static prereqs to the included modules list
+my $static_prereqs = do { my $x = {
+ 'configure' => {
+ 'requires' => {
+ 'ExtUtils::MakeMaker' => '6.30'
+ }
+ },
+ 'develop' => {
+ 'requires' => {
+ 'Test::Pod' => '1.41'
+ }
+ },
+ 'runtime' => {
+ 'requires' => {
+ 'overload' => '0',
+ 'strict' => '0',
+ 'warnings' => '0'
+ }
+ },
+ 'test' => {
+ 'recommends' => {
+ 'CPAN::Meta' => '0',
+ 'CPAN::Meta::Requirements' => '2.120900'
+ },
+ 'requires' => {
+ 'Encode' => '0',
+ 'Encode::MIME::Header' => '0',
+ 'ExtUtils::MakeMaker' => '0',
+ 'File::Spec::Functions' => '0',
+ 'List::Util' => '0',
+ 'Test::More' => '0.96',
+ 'version' => '0'
+ }
+ }
+ };
+ $x;
+ };
+
+delete $static_prereqs->{develop} if not $ENV{AUTHOR_TESTING};
+$include{$_} = 1 for map { keys %$_ } map { values %$_ } values %$static_prereqs;
+
+# Merge requirements for major phases (if we can)
+my $all_requires;
+if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META_REQ ) {
+ $all_requires = $cpan_meta_req->new;
+ _merge_requires($all_requires, $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) } ) {
+ my $dynamic_prereqs = $meta->prereqs;
+ delete $dynamic_prereqs->{develop} if not $ENV{AUTHOR_TESTING};
+ $include{$_} = 1 for map { keys %$_ } map { values %$_ } values %$dynamic_prereqs;
+
+ if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META_REQ ) {
+ _merge_requires($all_requires, $dynamic_prereqs);
+ }
+ }
+}
+else {
+ $source = 'static metadata';
+}
+
+my @modules = sort grep { ! $exclude{$_} } keys %include;
+my @reports = [qw/Version Module/];
+my @dep_errors;
+my $req_hash = defined($all_requires) ? $all_requires->as_string_hash : {};
+
+for my $mod ( @modules ) {
+ next if $mod eq 'perl';
+ my $file = $mod;
+ $file =~ s{::}{/}g;
+ $file .= ".pm";
+ my ($prefix) = grep { -e catfile($_, $file) } @INC;
+ if ( $prefix ) {
+ my $ver = MM->parse_version( catfile($prefix, $file) );
+ $ver = "undef" unless defined $ver; # Newer MM should do this anyway
+ push @reports, [$ver, $mod];
+
+ if ( $DO_VERIFY_PREREQS && $all_requires ) {
+ my $req = $req_hash->{$mod};
+ if ( defined $req && length $req ) {
+ if ( ! defined eval { version->parse($ver) } ) {
+ push @dep_errors, "$mod version '$ver' cannot be parsed (version '$req' required)";
+ }
+ elsif ( ! $all_requires->accepts_module( $mod => $ver ) ) {
+ push @dep_errors, "$mod version '$ver' is not in required range '$req'";
+ }
+ }
+ }
+
+ }
+ else {
+ push @reports, ["missing", $mod];
+
+ if ( $DO_VERIFY_PREREQS && $all_requires ) {
+ my $req = $req_hash->{$mod};
+ if ( defined $req && length $req ) {
+ push @dep_errors, "$mod is not installed (version '$req' required)";
+ }
+ }
+ }
+}
+
+if ( @reports ) {
+ my $vl = max map { length $_->[0] } @reports;
+ my $ml = max map { length $_->[1] } @reports;
+ splice @reports, 1, 0, ["-" x $vl, "-" x $ml];
+ diag "\nVersions for all modules listed in $source (including optional ones):\n",
+ map {sprintf(" %*s %*s\n",$vl,$_->[0],-$ml,$_->[1])} @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,80 +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.09\n";
-
-eval { # no excuses!
- # report our Perl details
- my $want = "any version";
- $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('Capture::Tiny','any version') };
-eval { $v .= pmver('Encode','any version') };
-eval { $v .= pmver('Encode::MIME::Header','any version') };
-eval { $v .= pmver('ExtUtils::MakeMaker','6.30') };
-eval { $v .= pmver('Test::More','0.96') };
-eval { $v .= pmver('Test::Pod','1.41') };
-eval { $v .= pmver('blib','any version') };
-eval { $v .= pmver('overload','any version') };
-eval { $v .= pmver('strict','any version') };
-eval { $v .= pmver('version','0.9901') };
-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;
@@ -37,6 +37,14 @@ my @tests = (
],
q{"Name Surrounded With Quotes" <foobar@example.com>},
],
+ [
+ [
+ "",
+ undef,
+ undef,
+ ],
+ '',
+ ],
);
plan tests => scalar @tests;
@@ -2,7 +2,7 @@
use strict;
use Email::Address;
-use Test::More tests => 8;
+use Test::More tests => 12;
my $phrase = q{jack!work};
my $email = 'jack@work.com';
@@ -42,3 +42,27 @@ is($ea3->phrase, $phrase, "the phrase method returns the right thing");
is $ea->phrase, q{jack "\\" robinson};
is $ea->format, q{"jack \\"\\\\\\" robinson" <jack@work.com>};
}
+
+is(
+ Email::Address->new('X', 'Y@example.mil', 'Z')->format,
+ q{"X" <Y@example.mil> (Z)},
+ 'we parenthesize comments',
+);
+
+is(
+ Email::Address->new('X', 'Y@example.mil', '0')->format,
+ q{"X" <Y@example.mil> (0)},
+ 'we parenthesize comments',
+);
+
+is(
+ Email::Address->new(undef, 'Y@example.mil', '0')->format,
+ q{<Y@example.mil> (0)},
+ 'we do not provide an empty phrase',
+);
+
+is(
+ Email::Address->new('', 'Y@example.mil', '0')->format,
+ q{<Y@example.mil> (0)},
+ 'we do not provide an empty phrase',
+);
@@ -4,7 +4,7 @@ use Test::More tests => 2;
note 'Checking Changes';
my $changes_file = 'Changes';
-my $newver = '1.900';
+my $newver = '1.903';
my $trial_token = '-TRIAL';
SKIP: {
@@ -1,7 +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();