@@ -1,5 +1,12 @@
Revision history for Number::Tolerant
+1.705 2014-11-16 13:59:01-05:00 America/New_York
+ - correct reversed-order of parameters in documentation for
+ Test::Tolerant
+
+1.704 2014-10-30 23:11:41-04:00 America/New_York
+ - do not rely on feature.pm -- that was an accident
+
1.703 2014-02-01 19:31:40-05:00 America/New_York
- overload tolerances for ~~ operator (thanks, Smylers!)
@@ -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.025.
Changes
LICENSE
MANIFEST
@@ -22,7 +22,8 @@ lib/Number/Tolerant/Type/plus_or_minus_pct.pm
lib/Number/Tolerant/Type/to.pm
lib/Number/Tolerant/Union.pm
lib/Test/Tolerant.pm
-t/000-report-versions-tiny.t
+t/00-report-prereqs.dd
+t/00-report-prereqs.t
t/and_constant.t
t/and_tolerance.t
t/bad_method.t
@@ -4,7 +4,7 @@
"Ricardo Signes <rjbs@cpan.org>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 5.012, CPAN::Meta::Converter version 2.133380",
+ "generated_by" : "Dist::Zilla version 5.025, CPAN::Meta::Converter version 2.142690",
"license" : [
"perl_5"
],
@@ -16,13 +16,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" : {
@@ -41,11 +40,15 @@
}
},
"test" : {
+ "recommends" : {
+ "CPAN::Meta" : "2.120900"
+ },
"requires" : {
+ "ExtUtils::MakeMaker" : "0",
+ "File::Spec" : "0",
"Test::More" : "0.96",
"Test::Tester" : "0",
"base" : "0",
- "feature" : "0",
"if" : "0"
}
}
@@ -62,26 +65,43 @@
"web" : "https://github.com/rjbs/Number-Tolerant"
}
},
- "version" : "1.703",
+ "version" : "1.705",
"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.025"
},
{
"class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed",
"name" : "@RJBS/CheckPrereqsIndexed",
- "version" : "0.010"
+ "version" : "0.012"
},
{
"class" : "Dist::Zilla::Plugin::CheckExtraTests",
"name" : "@RJBS/CheckExtraTests",
- "version" : "0.016"
+ "version" : "0.024"
},
{
"class" : "Dist::Zilla::Plugin::PromptIfStale",
@@ -97,7 +117,7 @@
}
},
"name" : "@RJBS/RJBS-Outdated",
- "version" : "0.015"
+ "version" : "0.029"
},
{
"class" : "Dist::Zilla::Plugin::PromptIfStale",
@@ -111,112 +131,127 @@
}
},
"name" : "@RJBS/CPAN-Outdated",
- "version" : "0.015"
+ "version" : "0.029"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@RJBS/@Filter/PruneCruft",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"class" : "Dist::Zilla::Plugin::ManifestSkip",
"name" : "@RJBS/@Filter/ManifestSkip",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@RJBS/@Filter/MetaYAML",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@RJBS/@Filter/License",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"class" : "Dist::Zilla::Plugin::Readme",
"name" : "@RJBS/@Filter/Readme",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@RJBS/@Filter/ExecDir",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"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.025"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@RJBS/@Filter/Manifest",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@RJBS/@Filter/TestRelease",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@RJBS/@Filter/ConfirmRelease",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@RJBS/@Filter/UploadToCPAN",
- "version" : "5.012"
+ "version" : "5.025"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::MakeMaker",
+ "config" : {
+ "Dist::Zilla::Role::TestRunner" : {
+ "default_jobs" : 9
+ }
+ },
+ "name" : "@RJBS/MakeMaker",
+ "version" : "5.025"
},
{
"class" : "Dist::Zilla::Plugin::AutoPrereqs",
"name" : "@RJBS/AutoPrereqs",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"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.025"
},
{
"class" : "Dist::Zilla::Plugin::PkgVersion",
"name" : "@RJBS/PkgVersion",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@RJBS/MetaConfig",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@RJBS/MetaJSON",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"class" : "Dist::Zilla::Plugin::NextRelease",
"name" : "@RJBS/NextRelease",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"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.025"
},
{
- "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",
@@ -227,7 +262,7 @@
}
},
"name" : "@RJBS/TestMoreWithSubtests",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"class" : "Dist::Zilla::Plugin::PodWeaver",
@@ -244,163 +279,222 @@
{
"class" : "Pod::Weaver::Plugin::EnsurePod5",
"name" : "@CorePrep/EnsurePod5",
- "version" : "4.006"
+ "version" : "4.007"
},
{
"class" : "Pod::Weaver::Plugin::H1Nester",
"name" : "@CorePrep/H1Nester",
- "version" : "4.006"
+ "version" : "4.007"
},
{
"class" : "Pod::Weaver::Plugin::SingleEncoding",
"name" : "@RJBS/SingleEncoding",
- "version" : "4.006"
+ "version" : "4.007"
},
{
"class" : "Pod::Weaver::Section::Name",
"name" : "@RJBS/Name",
- "version" : "4.006"
+ "version" : "4.007"
},
{
"class" : "Pod::Weaver::Section::Version",
"name" : "@RJBS/Version",
- "version" : "4.006"
+ "version" : "4.007"
},
{
"class" : "Pod::Weaver::Section::Region",
"name" : "@RJBS/Prelude",
- "version" : "4.006"
+ "version" : "4.007"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "@RJBS/Synopsis",
- "version" : "4.006"
+ "version" : "4.007"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "@RJBS/Description",
- "version" : "4.006"
+ "version" : "4.007"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "@RJBS/Overview",
- "version" : "4.006"
+ "version" : "4.007"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "@RJBS/Stability",
- "version" : "4.006"
+ "version" : "4.007"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "Attributes",
- "version" : "4.006"
+ "version" : "4.007"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "Methods",
- "version" : "4.006"
+ "version" : "4.007"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "Functions",
- "version" : "4.006"
+ "version" : "4.007"
},
{
"class" : "Pod::Weaver::Section::Leftovers",
"name" : "@RJBS/Leftovers",
- "version" : "4.006"
+ "version" : "4.007"
},
{
"class" : "Pod::Weaver::Section::Region",
"name" : "@RJBS/postlude",
- "version" : "4.006"
+ "version" : "4.007"
},
{
"class" : "Pod::Weaver::Section::Authors",
"name" : "@RJBS/Authors",
- "version" : "4.006"
+ "version" : "4.007"
},
{
"class" : "Pod::Weaver::Section::Legal",
"name" : "@RJBS/Legal",
- "version" : "4.006"
+ "version" : "4.007"
},
{
"class" : "Pod::Weaver::Plugin::Transformer",
"name" : "@RJBS/List",
- "version" : "4.006"
+ "version" : "4.007"
}
]
}
},
"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.025"
},
{
"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.025"
},
{
"class" : "Dist::Zilla::Plugin::Git::Tag",
+ "config" : {
+ "Dist::Zilla::Plugin::Git::Tag" : {
+ "branch" : null,
+ "signed" : 0,
+ "tag" : "1.705",
+ "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.025"
},
{
"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.025"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":IncModules",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":MainModule",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":AllFiles",
- "version" : "5.012"
+ "version" : "5.025"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":NoFiles",
- "version" : "5.012"
+ "version" : "5.025"
}
],
"zilla" : {
@@ -408,7 +502,7 @@
"config" : {
"is_trial" : "0"
},
- "version" : "5.012"
+ "version" : "5.025"
}
}
}
@@ -3,53 +3,67 @@ abstract: 'tolerance ranges for inexact numbers'
author:
- 'Ricardo Signes <rjbs@cpan.org>'
build_requires:
- Test::More: 0.96
- Test::Tester: 0
- base: 0
- feature: 0
- if: 0
+ ExtUtils::MakeMaker: '0'
+ File::Spec: '0'
+ Test::More: '0.96'
+ Test::Tester: '0'
+ base: '0'
+ if: '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.025, CPAN::Meta::Converter version 2.142690'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ version: '1.4'
name: Number-Tolerant
requires:
- Carp: 0
- Math::BigFloat: 0
- Math::BigRat: 0
- Scalar::Util: 0
- Sub::Exporter: 0.950
- Sub::Exporter::Util: 0
- Test::Builder: 0
- overload: 0
- parent: 0
- strict: 0
- warnings: 0
+ Carp: '0'
+ Math::BigFloat: '0'
+ Math::BigRat: '0'
+ Scalar::Util: '0'
+ Sub::Exporter: '0.950'
+ Sub::Exporter::Util: '0'
+ Test::Builder: '0'
+ overload: '0'
+ parent: '0'
+ strict: '0'
+ warnings: '0'
resources:
bugtracker: https://github.com/rjbs/Number-Tolerant/issues
homepage: https://github.com/rjbs/Number-Tolerant
repository: https://github.com/rjbs/Number-Tolerant.git
-version: 1.703
+version: '1.705'
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.025'
-
class: Dist::Zilla::Plugin::CheckPrereqsIndexed
name: '@RJBS/CheckPrereqsIndexed'
- version: 0.010
+ version: '0.012'
-
class: Dist::Zilla::Plugin::CheckExtraTests
name: '@RJBS/CheckExtraTests'
- version: 0.016
+ version: '0.024'
-
class: Dist::Zilla::Plugin::PromptIfStale
config:
@@ -61,102 +75,112 @@ x_Dist_Zilla:
phase: build
skip: []
name: '@RJBS/RJBS-Outdated'
- version: 0.015
+ version: '0.029'
-
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.029'
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@RJBS/@Filter/PruneCruft'
- version: 5.012
+ version: '5.025'
-
class: Dist::Zilla::Plugin::ManifestSkip
name: '@RJBS/@Filter/ManifestSkip'
- version: 5.012
+ version: '5.025'
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@RJBS/@Filter/MetaYAML'
- version: 5.012
+ version: '5.025'
-
class: Dist::Zilla::Plugin::License
name: '@RJBS/@Filter/License'
- version: 5.012
+ version: '5.025'
-
class: Dist::Zilla::Plugin::Readme
name: '@RJBS/@Filter/Readme'
- version: 5.012
+ version: '5.025'
-
class: Dist::Zilla::Plugin::ExecDir
name: '@RJBS/@Filter/ExecDir'
- version: 5.012
+ version: '5.025'
-
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.025'
-
class: Dist::Zilla::Plugin::Manifest
name: '@RJBS/@Filter/Manifest'
- version: 5.012
+ version: '5.025'
-
class: Dist::Zilla::Plugin::TestRelease
name: '@RJBS/@Filter/TestRelease'
- version: 5.012
+ version: '5.025'
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@RJBS/@Filter/ConfirmRelease'
- version: 5.012
+ version: '5.025'
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@RJBS/@Filter/UploadToCPAN'
- version: 5.012
+ version: '5.025'
+ -
+ class: Dist::Zilla::Plugin::MakeMaker
+ config:
+ Dist::Zilla::Role::TestRunner:
+ default_jobs: 9
+ name: '@RJBS/MakeMaker'
+ version: '5.025'
-
class: Dist::Zilla::Plugin::AutoPrereqs
name: '@RJBS/AutoPrereqs'
- version: 5.012
+ version: '5.025'
-
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.025'
-
class: Dist::Zilla::Plugin::PkgVersion
name: '@RJBS/PkgVersion'
- version: 5.012
+ version: '5.025'
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@RJBS/MetaConfig'
- version: 5.012
+ version: '5.025'
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@RJBS/MetaJSON'
- version: 5.012
+ version: '5.025'
-
class: Dist::Zilla::Plugin::NextRelease
name: '@RJBS/NextRelease'
- version: 5.012
+ version: '5.025'
-
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.025'
-
- 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:
@@ -164,7 +188,7 @@ x_Dist_Zilla:
phase: test
type: requires
name: '@RJBS/TestMoreWithSubtests'
- version: 5.012
+ version: '5.025'
-
class: Dist::Zilla::Plugin::PodWeaver
config:
@@ -178,131 +202,173 @@ x_Dist_Zilla:
-
class: Pod::Weaver::Plugin::EnsurePod5
name: '@CorePrep/EnsurePod5'
- version: 4.006
+ version: '4.007'
-
class: Pod::Weaver::Plugin::H1Nester
name: '@CorePrep/H1Nester'
- version: 4.006
+ version: '4.007'
-
class: Pod::Weaver::Plugin::SingleEncoding
name: '@RJBS/SingleEncoding'
- version: 4.006
+ version: '4.007'
-
class: Pod::Weaver::Section::Name
name: '@RJBS/Name'
- version: 4.006
+ version: '4.007'
-
class: Pod::Weaver::Section::Version
name: '@RJBS/Version'
- version: 4.006
+ version: '4.007'
-
class: Pod::Weaver::Section::Region
name: '@RJBS/Prelude'
- version: 4.006
+ version: '4.007'
-
class: Pod::Weaver::Section::Generic
name: '@RJBS/Synopsis'
- version: 4.006
+ version: '4.007'
-
class: Pod::Weaver::Section::Generic
name: '@RJBS/Description'
- version: 4.006
+ version: '4.007'
-
class: Pod::Weaver::Section::Generic
name: '@RJBS/Overview'
- version: 4.006
+ version: '4.007'
-
class: Pod::Weaver::Section::Generic
name: '@RJBS/Stability'
- version: 4.006
+ version: '4.007'
-
class: Pod::Weaver::Section::Collect
name: Attributes
- version: 4.006
+ version: '4.007'
-
class: Pod::Weaver::Section::Collect
name: Methods
- version: 4.006
+ version: '4.007'
-
class: Pod::Weaver::Section::Collect
name: Functions
- version: 4.006
+ version: '4.007'
-
class: Pod::Weaver::Section::Leftovers
name: '@RJBS/Leftovers'
- version: 4.006
+ version: '4.007'
-
class: Pod::Weaver::Section::Region
name: '@RJBS/postlude'
- version: 4.006
+ version: '4.007'
-
class: Pod::Weaver::Section::Authors
name: '@RJBS/Authors'
- version: 4.006
+ version: '4.007'
-
class: Pod::Weaver::Section::Legal
name: '@RJBS/Legal'
- version: 4.006
+ version: '4.007'
-
class: Pod::Weaver::Plugin::Transformer
name: '@RJBS/List'
- version: 4.006
+ version: '4.007'
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.025'
-
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.025'
-
class: Dist::Zilla::Plugin::Git::Tag
+ config:
+ Dist::Zilla::Plugin::Git::Tag:
+ branch: ~
+ signed: 0
+ tag: '1.705'
+ 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.025'
-
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.025'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
- version: 5.012
+ version: '5.025'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':IncModules'
- version: 5.012
+ version: '5.025'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
- version: 5.012
+ version: '5.025'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
- version: 5.012
+ version: '5.025'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
- version: 5.012
+ version: '5.025'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':MainModule'
- version: 5.012
+ version: '5.025'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':AllFiles'
- version: 5.012
+ version: '5.025'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':NoFiles'
- version: 5.012
+ version: '5.025'
zilla:
class: Dist::Zilla::Dist::Builder
config:
- is_trial: 0
- version: 5.012
+ is_trial: '0'
+ version: '5.025'
@@ -1,20 +1,19 @@
-# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.012.
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.025.
use strict;
use warnings;
-use ExtUtils::MakeMaker 6.30;
+use ExtUtils::MakeMaker;
my %WriteMakefileArgs = (
"ABSTRACT" => "tolerance ranges for inexact numbers",
"AUTHOR" => "Ricardo Signes <rjbs\@cpan.org>",
- "BUILD_REQUIRES" => {},
"CONFIGURE_REQUIRES" => {
- "ExtUtils::MakeMaker" => "6.30"
+ "ExtUtils::MakeMaker" => 0
},
"DISTNAME" => "Number-Tolerant",
"EXE_FILES" => [],
@@ -34,13 +33,14 @@ my %WriteMakefileArgs = (
"warnings" => 0
},
"TEST_REQUIRES" => {
+ "ExtUtils::MakeMaker" => 0,
+ "File::Spec" => 0,
"Test::More" => "0.96",
"Test::Tester" => 0,
"base" => 0,
- "feature" => 0,
"if" => 0
},
- "VERSION" => "1.703",
+ "VERSION" => "1.705",
"test" => {
"TESTS" => "t/*.t"
}
@@ -49,6 +49,8 @@ my %WriteMakefileArgs = (
my %FallbackPrereqs = (
"Carp" => 0,
+ "ExtUtils::MakeMaker" => 0,
+ "File::Spec" => 0,
"Math::BigFloat" => 0,
"Math::BigRat" => 0,
"Scalar::Util" => 0,
@@ -58,7 +60,6 @@ my %FallbackPrereqs = (
"Test::More" => "0.96",
"Test::Tester" => 0,
"base" => 0,
- "feature" => 0,
"if" => 0,
"overload" => 0,
"parent" => 0,
@@ -1,7 +1,7 @@
This archive contains the distribution Number-Tolerant,
-version 1.703:
+version 1.705:
tolerance ranges for inexact numbers
@@ -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.025.
@@ -2,25 +2,25 @@ use strict;
use warnings;
package Number::Tolerant::Constant;
# ABSTRACT: a blessed constant type
-$Number::Tolerant::Constant::VERSION = '1.703';
-# =head1 SYNOPSIS
-#
-# use Number::Tolerant;
-# use Number::Tolerant::Constant;
-#
-# my $range = tolerance(10);
-# ref $range; # "Number::Tolerant" -- w/o ::Constant, would be undef
-#
-# =head1 DESCRIPTION
-#
-# When Number::Tolerant is about to return a tolerance with zero variation, it
-# will return a constant instead. This module will register a constant type that
-# will catch these constants and return them as Number::Tolerant objects.
-#
-# I wrote this module to make it simpler to use tolerances with Class::DBI, which
-# would otherwise complain that the constructor hadn't returned a blessed object.
-#
-# =cut
+$Number::Tolerant::Constant::VERSION = '1.705';
+#pod =head1 SYNOPSIS
+#pod
+#pod use Number::Tolerant;
+#pod use Number::Tolerant::Constant;
+#pod
+#pod my $range = tolerance(10);
+#pod ref $range; # "Number::Tolerant" -- w/o ::Constant, would be undef
+#pod
+#pod =head1 DESCRIPTION
+#pod
+#pod When Number::Tolerant is about to return a tolerance with zero variation, it
+#pod will return a constant instead. This module will register a constant type that
+#pod will catch these constants and return them as Number::Tolerant objects.
+#pod
+#pod I wrote this module to make it simpler to use tolerances with Class::DBI, which
+#pod would otherwise complain that the constructor hadn't returned a blessed object.
+#pod
+#pod =cut
package
Number::Tolerant::Type::constant_obj;
@@ -78,7 +78,7 @@ Number::Tolerant::Constant - a blessed constant type
=head1 VERSION
-version 1.703
+version 1.705
=head1 SYNOPSIS
@@ -39,7 +39,7 @@ Number::Tolerant::Type::constant - a tolerance "m == n"
=head1 VERSION
-version 1.703
+version 1.705
=head1 AUTHOR
@@ -33,7 +33,7 @@ Number::Tolerant::Type::infinite - an infinite tolerance
=head1 VERSION
-version 1.703
+version 1.705
=head1 AUTHOR
@@ -53,7 +53,7 @@ Number::Tolerant::Type::less_than - a tolerance "m < n"
=head1 VERSION
-version 1.703
+version 1.705
=head1 AUTHOR
@@ -53,7 +53,7 @@ Number::Tolerant::Type::more_than - a tolerance "m > n"
=head1 VERSION
-version 1.703
+version 1.705
=head1 AUTHOR
@@ -63,7 +63,7 @@ Number::Tolerant::Type::offset - a tolerance "m (-l or +n)"
=head1 VERSION
-version 1.703
+version 1.705
=head1 AUTHOR
@@ -45,7 +45,7 @@ Number::Tolerant::Type::or_less - a tolerance "m <= n"
=head1 VERSION
-version 1.703
+version 1.705
=head1 AUTHOR
@@ -44,7 +44,7 @@ Number::Tolerant::Type::or_more - a tolerance "m >= n"
=head1 VERSION
-version 1.703
+version 1.705
=head1 AUTHOR
@@ -53,7 +53,7 @@ Number::Tolerant::Type::plus_or_minus - a tolerance "m +/- n"
=head1 VERSION
-version 1.703
+version 1.705
=head1 AUTHOR
@@ -52,7 +52,7 @@ Number::Tolerant::Type::plus_or_minus_pct - a tolerance "m +/- n%"
=head1 VERSION
-version 1.703
+version 1.705
=head1 AUTHOR
@@ -56,7 +56,7 @@ Number::Tolerant::Type::to - a tolerance "m to n"
=head1 VERSION
-version 1.703
+version 1.705
=head1 AUTHOR
@@ -2,58 +2,58 @@ use strict;
use warnings;
package Number::Tolerant::Type;
# ABSTRACT: a type of tolerance
-$Number::Tolerant::Type::VERSION = '1.703';
+$Number::Tolerant::Type::VERSION = '1.705';
use parent qw(Number::Tolerant);
use Math::BigFloat;
use Math::BigRat;
-# =head1 SYNOPSIS
-#
-# =cut
-
-# =head1 METHODS
-#
-# =head2 valid_args
-#
-# my @args = $type_class->valid_args(@_);
-#
-# If the arguments to C<valid_args> are valid arguments for this type of
-# tolerance, this method returns their canonical form, suitable for passing to
-# C<L</construct>>. Otherwise this method returns false.
-#
-# =head2 construct
-#
-# my $object_guts = $type_class->construct(@args);
-#
-# This method is passed the output of the C<L</valid_args>> method, and should
-# return a hashref that will become the guts of a new tolerance.
-#
-# =head2 parse
-#
-# my $tolerance = $type_class->parse($string);
-#
-# This method returns a new, fully constructed tolerance from the given string
-# if the given string can be parsed into a tolerance of this type.
-#
-# =head2 number_re
-#
-# my $number_re = $type_class->number_re;
-#
-# This method returns the regular expression (as a C<qx> construct) used to match
-# number in parsed strings.
-#
-# =head2 normalize_number
-#
-# my $number = $type_class->normalize_number($input);
-#
-# This method will decide whether the given input is a valid number for use with
-# Number::Tolerant and return it in a canonicalized form. Math::BigInt objects
-# are returned intact. Strings holding numbers are also returned intact.
-# Strings that appears to be fractions are converted to Math::BigRat objects.
-#
-# Anything else is considered invalid, and the method will return false.
-#
-# =cut
+#pod =head1 SYNOPSIS
+#pod
+#pod =cut
+
+#pod =head1 METHODS
+#pod
+#pod =head2 valid_args
+#pod
+#pod my @args = $type_class->valid_args(@_);
+#pod
+#pod If the arguments to C<valid_args> are valid arguments for this type of
+#pod tolerance, this method returns their canonical form, suitable for passing to
+#pod C<L</construct>>. Otherwise this method returns false.
+#pod
+#pod =head2 construct
+#pod
+#pod my $object_guts = $type_class->construct(@args);
+#pod
+#pod This method is passed the output of the C<L</valid_args>> method, and should
+#pod return a hashref that will become the guts of a new tolerance.
+#pod
+#pod =head2 parse
+#pod
+#pod my $tolerance = $type_class->parse($string);
+#pod
+#pod This method returns a new, fully constructed tolerance from the given string
+#pod if the given string can be parsed into a tolerance of this type.
+#pod
+#pod =head2 number_re
+#pod
+#pod my $number_re = $type_class->number_re;
+#pod
+#pod This method returns the regular expression (as a C<qx> construct) used to match
+#pod number in parsed strings.
+#pod
+#pod =head2 normalize_number
+#pod
+#pod my $number = $type_class->normalize_number($input);
+#pod
+#pod This method will decide whether the given input is a valid number for use with
+#pod Number::Tolerant and return it in a canonicalized form. Math::BigInt objects
+#pod are returned intact. Strings holding numbers are also returned intact.
+#pod Strings that appears to be fractions are converted to Math::BigRat objects.
+#pod
+#pod Anything else is considered invalid, and the method will return false.
+#pod
+#pod =cut
my $number;
BEGIN {
@@ -91,17 +91,17 @@ sub normalize_number {
return;
}
-# =head2 variable_re
-#
-# my $variable_re = $type_class->variable_re;
-#
-# This method returns the regular expression (as a C<qr> construct) used to match
-# the variable in parsed strings.
-#
-# When parsing "4 <= x <= 10" this regular expression is used to match the letter
-# "x."
-#
-# =cut
+#pod =head2 variable_re
+#pod
+#pod my $variable_re = $type_class->variable_re;
+#pod
+#pod This method returns the regular expression (as a C<qr> construct) used to match
+#pod the variable in parsed strings.
+#pod
+#pod When parsing "4 <= x <= 10" this regular expression is used to match the letter
+#pod "x."
+#pod
+#pod =cut
my $X;
BEGIN { $X = qr/(?:\s*x\s*)/; }
@@ -122,7 +122,7 @@ Number::Tolerant::Type - a type of tolerance
=head1 VERSION
-version 1.703
+version 1.705
=head1 SYNOPSIS
@@ -2,102 +2,102 @@ use strict;
use warnings;
package Number::Tolerant::Union;
# ABSTRACT: unions of tolerance ranges
-$Number::Tolerant::Union::VERSION = '1.703';
-# =head1 SYNOPSIS
-#
-# use Number::Tolerant;
-#
-# my $range1 = tolerance(10 => to => 12);
-# my $range2 = tolerance(14 => to => 16);
-#
-# my $union = $range1 | $range2;
-#
-# if ($11 == $union) { ... } # this will happen
-# if ($12 == $union) { ... } # so will this
-#
-# if ($13 == $union) { ... } # nothing will happen here
-#
-# if ($14 == $union) { ... } # this will happen
-# if ($15 == $union) { ... } # so will this
-#
-# =head1 DESCRIPTION
-#
-# Number::Tolerant::Union is used by L<Number::Tolerant> to represent the union
-# of multiple tolerances. A subset of the same operators that function on a
-# tolerance will function on a union of tolerances, as listed below.
-#
-# =head1 METHODS
-#
-# =head2 new
-#
-# my $union = Number::Tolerant::Union->new(@list_of_tolerances);
-#
-# There is a C<new> method on the Number::Tolerant::Union class, but unions are
-# meant to be created with the C<|> operator on a Number::Tolerant tolerance.
-#
-# The arguments to C<new> are a list of numbers or tolerances to be unioned.
-#
-# Intersecting ranges are not converted into a single range, but this may change
-# in the future. (For example, the union of "5 to 10" and "7 to 12" is not "5 to
-# 12.")
-#
-# =cut
+$Number::Tolerant::Union::VERSION = '1.705';
+#pod =head1 SYNOPSIS
+#pod
+#pod use Number::Tolerant;
+#pod
+#pod my $range1 = tolerance(10 => to => 12);
+#pod my $range2 = tolerance(14 => to => 16);
+#pod
+#pod my $union = $range1 | $range2;
+#pod
+#pod if ($11 == $union) { ... } # this will happen
+#pod if ($12 == $union) { ... } # so will this
+#pod
+#pod if ($13 == $union) { ... } # nothing will happen here
+#pod
+#pod if ($14 == $union) { ... } # this will happen
+#pod if ($15 == $union) { ... } # so will this
+#pod
+#pod =head1 DESCRIPTION
+#pod
+#pod Number::Tolerant::Union is used by L<Number::Tolerant> to represent the union
+#pod of multiple tolerances. A subset of the same operators that function on a
+#pod tolerance will function on a union of tolerances, as listed below.
+#pod
+#pod =head1 METHODS
+#pod
+#pod =head2 new
+#pod
+#pod my $union = Number::Tolerant::Union->new(@list_of_tolerances);
+#pod
+#pod There is a C<new> method on the Number::Tolerant::Union class, but unions are
+#pod meant to be created with the C<|> operator on a Number::Tolerant tolerance.
+#pod
+#pod The arguments to C<new> are a list of numbers or tolerances to be unioned.
+#pod
+#pod Intersecting ranges are not converted into a single range, but this may change
+#pod in the future. (For example, the union of "5 to 10" and "7 to 12" is not "5 to
+#pod 12.")
+#pod
+#pod =cut
sub new {
my $class = shift;
bless { options => [ @_ ] } => $class;
}
-# =head2 options
-#
-# This method will return a list of all the acceptable options for the union.
-#
-# =cut
+#pod =head2 options
+#pod
+#pod This method will return a list of all the acceptable options for the union.
+#pod
+#pod =cut
sub options {
my $self = shift;
return @{$self->{options}};
}
-# =head2 Overloading
-#
-# Tolerance unions overload a few operations, mostly comparisons.
-#
-# =over
-#
-# =item numification
-#
-# Unions numify to undef. If there's a better idea, I'd love to hear it.
-#
-# =item stringification
-#
-# A tolerance stringifies to a short description of itself. This is a set of the
-# union's options, parentheses-enclosed and joined by the word "or"
-#
-# =item equality
-#
-# A number is equal to a union if it is equal to any of its options.
-#
-# =item comparison
-#
-# A number is greater than a union if it is greater than all its options.
-#
-# A number is less than a union if it is less than all its options.
-#
-# =item union intersection
-#
-# An intersection (C<&>) with a union is commutted across all options. In other
-# words:
-#
-# (a | b | c) & d ==yields==> ((a & d) | (b & d) | (c & d))
-#
-# Options that have no intersection with the new element are dropped. The
-# intersection of a constant number and a union yields that number, if the number
-# was in the union's ranges and otherwise yields nothing.
-#
-# =back
-#
-# =cut
+#pod =head2 Overloading
+#pod
+#pod Tolerance unions overload a few operations, mostly comparisons.
+#pod
+#pod =over
+#pod
+#pod =item numification
+#pod
+#pod Unions numify to undef. If there's a better idea, I'd love to hear it.
+#pod
+#pod =item stringification
+#pod
+#pod A tolerance stringifies to a short description of itself. This is a set of the
+#pod union's options, parentheses-enclosed and joined by the word "or"
+#pod
+#pod =item equality
+#pod
+#pod A number is equal to a union if it is equal to any of its options.
+#pod
+#pod =item comparison
+#pod
+#pod A number is greater than a union if it is greater than all its options.
+#pod
+#pod A number is less than a union if it is less than all its options.
+#pod
+#pod =item union intersection
+#pod
+#pod An intersection (C<&>) with a union is commutted across all options. In other
+#pod words:
+#pod
+#pod (a | b | c) & d ==yields==> ((a & d) | (b & d) | (c & d))
+#pod
+#pod Options that have no intersection with the new element are dropped. The
+#pod intersection of a constant number and a union yields that number, if the number
+#pod was in the union's ranges and otherwise yields nothing.
+#pod
+#pod =back
+#pod
+#pod =cut
use overload
'0+' => sub { undef },
@@ -129,11 +129,11 @@ use overload
},
fallback => 1;
-# =head1 TODO
-#
-# Who knows. Collapsing overlapping options, probably.
-#
-# =cut
+#pod =head1 TODO
+#pod
+#pod Who knows. Collapsing overlapping options, probably.
+#pod
+#pod =cut
1;
@@ -149,7 +149,7 @@ Number::Tolerant::Union - unions of tolerance ranges
=head1 VERSION
-version 1.703
+version 1.705
=head1 SYNOPSIS
@@ -2,7 +2,7 @@ use strict;
use warnings;
package Number::Tolerant;
# ABSTRACT: tolerance ranges for inexact numbers
-$Number::Tolerant::VERSION = '1.703';
+$Number::Tolerant::VERSION = '1.705';
use Sub::Exporter::Util;
use Sub::Exporter 0.950 -setup => {
exports => { tolerance => Sub::Exporter::Util::curry_class('new'), },
@@ -12,84 +12,84 @@ use Sub::Exporter 0.950 -setup => {
use Carp ();
use Scalar::Util ();
-# =head1 SYNOPSIS
-#
-# use Number::Tolerant;
-#
-# my $range = tolerance(10 => to => 12);
-# my $random = 10 + rand(2);
-#
-# die "I shouldn't die" unless $random == $range;
-#
-# print "This line will always print.\n";
-#
-# =head1 DESCRIPTION
-#
-# Number::Tolerant creates a number-like object whose value refers to a range of
-# possible values, each equally acceptable. It overloads comparison operations
-# to reflect this.
-#
-# I use this module to simplify the comparison of measurement results to
-# specified tolerances.
-#
-# reject $product unless $measurement == $specification;
-#
-# =head1 METHODS
-#
-# =head2 Instantiation
-#
-# =head3 new
-#
-# =head3 tolerance
-#
-# There is a C<new> method on the Number::Tolerant class, but it also exports a
-# simple function, C<tolerance>, which will return an object of the
-# Number::Tolerant class. Both use the same syntax:
-#
-# my $range = Number::Tolerant->new( $x => $method => $y);
-#
-# my $range = tolerance( $x => $method => $y);
-#
-# The meaning of C<$x> and C<$y> are dependent on the value of C<$method>, which
-# describes the nature of the tolerance. Tolerances can be defined in five ways,
-# at present:
-#
-# method range
-# -------------------+------------------
-# plus_or_minus | x +/- y
-# plus_or_minus_pct | x +/- (y% of x)
-# or_more | x to Inf
-# or_less | x to -Inf
-# more_than | x to Inf, not x
-# less_than | x to -Inf, not x
-# to | x to y
-# infinite | -Inf to Inf
-# offset | (x + y1) to (x + y2)
-#
-# For C<or_less> and C<or_more>, C<$y> is ignored if passed. For C<infinite>,
-# neither C<$x> nor C<$y> is used; "infinite" should be the sole argument. The
-# first two arguments can be reversed for C<more_than> and C<less_than>, to be
-# more English-like.
-#
-# Offset tolerances are slightly unusual. Here is an example:
-#
-# my $offset_tolerance = tolerance(10 => offset => (-3, 5));
-# # stringifies to: 10 (-3 +5)
-#
-# An offset is very much like a C<plus_or_minus> tolerance, but its center value
-# is not necessarily the midpoint between its extremes. This is significant for
-# comparisons and numifications of the tolerance. Given the following two
-# tolerances:
-#
-# my $pm_dice = tolerance(10.5 => plus_or_minus => 7.5);
-# my $os_dice = tolerance(11 => offset => (-8, 7));
-#
-# The first will sort as numerically less than the second.
-#
-# If the given arguments can't be formed into a tolerance, an exception will be
-# raised.
-#
-# =cut
+#pod =head1 SYNOPSIS
+#pod
+#pod use Number::Tolerant;
+#pod
+#pod my $range = tolerance(10 => to => 12);
+#pod my $random = 10 + rand(2);
+#pod
+#pod die "I shouldn't die" unless $random == $range;
+#pod
+#pod print "This line will always print.\n";
+#pod
+#pod =head1 DESCRIPTION
+#pod
+#pod Number::Tolerant creates a number-like object whose value refers to a range of
+#pod possible values, each equally acceptable. It overloads comparison operations
+#pod to reflect this.
+#pod
+#pod I use this module to simplify the comparison of measurement results to
+#pod specified tolerances.
+#pod
+#pod reject $product unless $measurement == $specification;
+#pod
+#pod =head1 METHODS
+#pod
+#pod =head2 Instantiation
+#pod
+#pod =head3 new
+#pod
+#pod =head3 tolerance
+#pod
+#pod There is a C<new> method on the Number::Tolerant class, but it also exports a
+#pod simple function, C<tolerance>, which will return an object of the
+#pod Number::Tolerant class. Both use the same syntax:
+#pod
+#pod my $range = Number::Tolerant->new( $x => $method => $y);
+#pod
+#pod my $range = tolerance( $x => $method => $y);
+#pod
+#pod The meaning of C<$x> and C<$y> are dependent on the value of C<$method>, which
+#pod describes the nature of the tolerance. Tolerances can be defined in five ways,
+#pod at present:
+#pod
+#pod method range
+#pod -------------------+------------------
+#pod plus_or_minus | x +/- y
+#pod plus_or_minus_pct | x +/- (y% of x)
+#pod or_more | x to Inf
+#pod or_less | x to -Inf
+#pod more_than | x to Inf, not x
+#pod less_than | x to -Inf, not x
+#pod to | x to y
+#pod infinite | -Inf to Inf
+#pod offset | (x + y1) to (x + y2)
+#pod
+#pod For C<or_less> and C<or_more>, C<$y> is ignored if passed. For C<infinite>,
+#pod neither C<$x> nor C<$y> is used; "infinite" should be the sole argument. The
+#pod first two arguments can be reversed for C<more_than> and C<less_than>, to be
+#pod more English-like.
+#pod
+#pod Offset tolerances are slightly unusual. Here is an example:
+#pod
+#pod my $offset_tolerance = tolerance(10 => offset => (-3, 5));
+#pod # stringifies to: 10 (-3 +5)
+#pod
+#pod An offset is very much like a C<plus_or_minus> tolerance, but its center value
+#pod is not necessarily the midpoint between its extremes. This is significant for
+#pod comparisons and numifications of the tolerance. Given the following two
+#pod tolerances:
+#pod
+#pod my $pm_dice = tolerance(10.5 => plus_or_minus => 7.5);
+#pod my $os_dice = tolerance(11 => offset => (-8, 7));
+#pod
+#pod The first will sort as numerically less than the second.
+#pod
+#pod If the given arguments can't be formed into a tolerance, an exception will be
+#pod raised.
+#pod
+#pod =cut
# these are the default plugins
my %_plugins;
@@ -174,21 +174,21 @@ sub new {
bless $self => $self->{method};
}
-# =head3 from_string
-#
-# A new tolerance can be instantiated from the stringification of an old
-# tolerance. For example:
-#
-# my $range = Number::Tolerant->from_string("10 to 12");
-#
-# die "Everything's OK!" if 11 == $range; # program dies of joy
-#
-# This will I<not> yet parse stringified unions, but that will be implemented in
-# the future. (I just don't need it yet.)
-#
-# If a string can't be parsed, an exception is raised.
-#
-# =cut
+#pod =head3 from_string
+#pod
+#pod A new tolerance can be instantiated from the stringification of an old
+#pod tolerance. For example:
+#pod
+#pod my $range = Number::Tolerant->from_string("10 to 12");
+#pod
+#pod die "Everything's OK!" if 11 == $range; # program dies of joy
+#pod
+#pod This will I<not> yet parse stringified unions, but that will be implemented in
+#pod the future. (I just don't need it yet.)
+#pod
+#pod If a string can't be parsed, an exception is raised.
+#pod
+#pod =cut
sub from_string {
my ($class, $string) = @_;
@@ -223,27 +223,27 @@ sub stringify {
return $string;
}
-# =head2 stringify_as
-#
-# my $string = $tolerance->stringify_as($type);
-#
-# This method does nothing! Someday, it will stringify the given tolerance as a
-# different type, if possible. "10 +/- 1" will
-# C<stringify_as('plus_or_minus_pct')> to "10 +/- 10%" for example.
-#
-# =cut
+#pod =head2 stringify_as
+#pod
+#pod my $string = $tolerance->stringify_as($type);
+#pod
+#pod This method does nothing! Someday, it will stringify the given tolerance as a
+#pod different type, if possible. "10 +/- 1" will
+#pod C<stringify_as('plus_or_minus_pct')> to "10 +/- 10%" for example.
+#pod
+#pod =cut
sub stringify_as { }
-# =head2 numify
-#
-# my $n = $tolerance->numify;
-#
-# This returns the numeric form of a tolerance. If a tolerance has both a
-# minimum and a maximum, and they are the same, then that is the numification.
-# Otherwise, numify returns undef.
-#
-# =cut
+#pod =head2 numify
+#pod
+#pod my $n = $tolerance->numify;
+#pod
+#pod This returns the numeric form of a tolerance. If a tolerance has both a
+#pod minimum and a maximum, and they are the same, then that is the numification.
+#pod Otherwise, numify returns undef.
+#pod
+#pod =cut
sub numify {
# if a tolerance has equal min and max, it numifies to that number
@@ -332,78 +332,78 @@ sub intersection {
} => 'Number::Tolerant::Type::to';
}
-# =head2 Overloading
-#
-# Tolerances overload a few operations, mostly comparisons.
-#
-# =over
-#
-# =item boolean
-#
-# Tolerances are always true.
-#
-# =item numify
-#
-# Most tolerances numify to undef; see C<L</numify>>.
-#
-# =item stringify
-#
-# A tolerance stringifies to a short description of itself, generally something
-# like "m < x < n"
-#
-# infinite - "any number"
-# to - "m <= x <= n"
-# or_more - "m <= x"
-# or_less - "x <= n"
-# more_than - "m < x"
-# less_than - "x < n"
-# offset - "x (-y1 +y2)"
-# constant - "x"
-# plus_or_minus - "x +/- y"
-# plus_or_minus_pct - "x +/- y%"
-#
-# =item equality
-#
-# A number is equal to a tolerance if it is neither less than nor greater than
-# it. (See below).
-#
-# =item smart match
-#
-# Same as equality.
-#
-# =item comparison
-#
-# A number is greater than a tolerance if it is greater than its maximum value.
-#
-# A number is less than a tolerance if it is less than its minimum value.
-#
-# No number is greater than an "or_more" tolerance or less than an "or_less"
-# tolerance.
-#
-# "...or equal to" comparisons include the min/max values in the permissible
-# range, as common sense suggests.
-#
-# =item tolerance intersection
-#
-# A tolerance C<&> a tolerance or number is the intersection of the two ranges.
-# Intersections allow you to quickly narrow down a set of tolerances to the most
-# stringent intersection of values.
-#
-# tolerance(5 => to => 6) & tolerance(5.5 => to => 6.5);
-# # this yields: tolerance(5.5 => to => 6)
-#
-# If the given values have no intersection, C<()> is returned.
-#
-# An intersection with a normal number will yield that number, if it is within
-# the tolerance.
-#
-# =item tolerance union
-#
-# A tolerance C<|> a tolerance or number is the union of the two. Unions allow
-# multiple tolerances, whether they intersect or not, to be treated as one. See
-# L<Number::Tolerant::Union> for more information.
-#
-# =cut
+#pod =head2 Overloading
+#pod
+#pod Tolerances overload a few operations, mostly comparisons.
+#pod
+#pod =over
+#pod
+#pod =item boolean
+#pod
+#pod Tolerances are always true.
+#pod
+#pod =item numify
+#pod
+#pod Most tolerances numify to undef; see C<L</numify>>.
+#pod
+#pod =item stringify
+#pod
+#pod A tolerance stringifies to a short description of itself, generally something
+#pod like "m < x < n"
+#pod
+#pod infinite - "any number"
+#pod to - "m <= x <= n"
+#pod or_more - "m <= x"
+#pod or_less - "x <= n"
+#pod more_than - "m < x"
+#pod less_than - "x < n"
+#pod offset - "x (-y1 +y2)"
+#pod constant - "x"
+#pod plus_or_minus - "x +/- y"
+#pod plus_or_minus_pct - "x +/- y%"
+#pod
+#pod =item equality
+#pod
+#pod A number is equal to a tolerance if it is neither less than nor greater than
+#pod it. (See below).
+#pod
+#pod =item smart match
+#pod
+#pod Same as equality.
+#pod
+#pod =item comparison
+#pod
+#pod A number is greater than a tolerance if it is greater than its maximum value.
+#pod
+#pod A number is less than a tolerance if it is less than its minimum value.
+#pod
+#pod No number is greater than an "or_more" tolerance or less than an "or_less"
+#pod tolerance.
+#pod
+#pod "...or equal to" comparisons include the min/max values in the permissible
+#pod range, as common sense suggests.
+#pod
+#pod =item tolerance intersection
+#pod
+#pod A tolerance C<&> a tolerance or number is the intersection of the two ranges.
+#pod Intersections allow you to quickly narrow down a set of tolerances to the most
+#pod stringent intersection of values.
+#pod
+#pod tolerance(5 => to => 6) & tolerance(5.5 => to => 6.5);
+#pod # this yields: tolerance(5.5 => to => 6)
+#pod
+#pod If the given values have no intersection, C<()> is returned.
+#pod
+#pod An intersection with a normal number will yield that number, if it is within
+#pod the tolerance.
+#pod
+#pod =item tolerance union
+#pod
+#pod A tolerance C<|> a tolerance or number is the union of the two. Unions allow
+#pod multiple tolerances, whether they intersect or not, to be treated as one. See
+#pod L<Number::Tolerant::Union> for more information.
+#pod
+#pod =cut
use overload
fallback => 1,
@@ -423,93 +423,93 @@ use overload
'|' => '_union',
'&' => '_intersection';
-# =back
-#
-# =head1 EXTENDING
-#
-# This feature is slighly experimental, but it's here.
-#
-# New tolerance types may be written as subclasses of L<Number::Tolerant::Type>,
-# providing the interface described in its documentation. They can then be
-# enabled or disabled with the following methods:
-#
-# =head2 C< enable_plugin >
-#
-# Number::Tolerant->enable_plugin($class_name);
-#
-# This method enables the named class, so that attempts to create new tolerances
-# will check against this class. Classes are checked against
-# C<L</validate_plugin>> before being enabled. An exception is thrown if the
-# class does not appear to provide the Number::Tolerant::Type interface.
-#
-# =head2 C< disable_plugin >
-#
-# Number::Tolerant->disable_plugin($class_name);
-#
-# This method will disable the named class, so that future attempts to create new
-# tolerances will not check against this class.
-#
-# =head2 C< validate_plugin >
-#
-# Number::Tolerant->validate_plugin($class_name);
-#
-# This method checks (naively) that the given class provides the interface
-# defined in Number::Tolerant::Type. If it does not, an exception is thrown.
-#
-# =head1 TODO
-#
-# =over 4
-#
-# =item * Extend C<from_string> to cover unions.
-#
-# =item * Extend C<from_string> to include Number::Range-type specifications.
-#
-# =item * Allow translation into forms not originally used:
-#
-# my $range = tolerance(9 => to => 17);
-# my $range_pm = $range->convert_to('plus_minus');
-# $range->stringify_as('plus_minus_pct');
-#
-# =item * Create a factory so that you can simultaneously work with two sets of plugins.
-#
-# This one is very near completion. There will now be two classes that should be
-# used: Number::Tolerant::Factory, which produces tolerances, and
-# Number::Tolerant::Tolerance, which is a tolerance. Both will inherit from
-# N::T, for supporting old code, and N::T will dispatch construction methods to a
-# default factory.
-#
-# =back
-#
-# =head1 SEE ALSO
-#
-# The module L<Number::Range> provides another way to deal with ranges of
-# numbers. The major differences are: N::R is set-like, not range-like; N::R
-# does not overload any operators. Number::Tolerant will not (like N::R) attempt
-# to parse a textual range specification like "1..2,5,7..10" unless specifically
-# instructed to. (The valid formats for strings passed to C<from_string> does
-# not match Number::Range exactly. See TODO.)
-#
-# The C<Number::Range> code:
-#
-# $range = Number::Range->new("10..15","20..25");
-#
-# Is equivalent to the C<Number::Tolerant> code:
-#
-# $range = Number::Tolerant::Union->new(10..15,20..25);
-#
-# ...while the following code expresses an actual range:
-#
-# $range = tolerance(10 => to => 15) | tolerance(20 => to => 25);
-#
-# =head1 THANKS
-#
-# Thanks to Yuval Kogman and #perl-qa for helping find the bizarre bug that drove
-# the minimum required perl up to 5.8
-#
-# Thanks to Tom Freedman, who reminded me that this code was fun to work on, and
-# also provided the initial implementation for the offset type.
-#
-# =cut
+#pod =back
+#pod
+#pod =head1 EXTENDING
+#pod
+#pod This feature is slighly experimental, but it's here.
+#pod
+#pod New tolerance types may be written as subclasses of L<Number::Tolerant::Type>,
+#pod providing the interface described in its documentation. They can then be
+#pod enabled or disabled with the following methods:
+#pod
+#pod =head2 C< enable_plugin >
+#pod
+#pod Number::Tolerant->enable_plugin($class_name);
+#pod
+#pod This method enables the named class, so that attempts to create new tolerances
+#pod will check against this class. Classes are checked against
+#pod C<L</validate_plugin>> before being enabled. An exception is thrown if the
+#pod class does not appear to provide the Number::Tolerant::Type interface.
+#pod
+#pod =head2 C< disable_plugin >
+#pod
+#pod Number::Tolerant->disable_plugin($class_name);
+#pod
+#pod This method will disable the named class, so that future attempts to create new
+#pod tolerances will not check against this class.
+#pod
+#pod =head2 C< validate_plugin >
+#pod
+#pod Number::Tolerant->validate_plugin($class_name);
+#pod
+#pod This method checks (naively) that the given class provides the interface
+#pod defined in Number::Tolerant::Type. If it does not, an exception is thrown.
+#pod
+#pod =head1 TODO
+#pod
+#pod =over 4
+#pod
+#pod =item * Extend C<from_string> to cover unions.
+#pod
+#pod =item * Extend C<from_string> to include Number::Range-type specifications.
+#pod
+#pod =item * Allow translation into forms not originally used:
+#pod
+#pod my $range = tolerance(9 => to => 17);
+#pod my $range_pm = $range->convert_to('plus_minus');
+#pod $range->stringify_as('plus_minus_pct');
+#pod
+#pod =item * Create a factory so that you can simultaneously work with two sets of plugins.
+#pod
+#pod This one is very near completion. There will now be two classes that should be
+#pod used: Number::Tolerant::Factory, which produces tolerances, and
+#pod Number::Tolerant::Tolerance, which is a tolerance. Both will inherit from
+#pod N::T, for supporting old code, and N::T will dispatch construction methods to a
+#pod default factory.
+#pod
+#pod =back
+#pod
+#pod =head1 SEE ALSO
+#pod
+#pod The module L<Number::Range> provides another way to deal with ranges of
+#pod numbers. The major differences are: N::R is set-like, not range-like; N::R
+#pod does not overload any operators. Number::Tolerant will not (like N::R) attempt
+#pod to parse a textual range specification like "1..2,5,7..10" unless specifically
+#pod instructed to. (The valid formats for strings passed to C<from_string> does
+#pod not match Number::Range exactly. See TODO.)
+#pod
+#pod The C<Number::Range> code:
+#pod
+#pod $range = Number::Range->new("10..15","20..25");
+#pod
+#pod Is equivalent to the C<Number::Tolerant> code:
+#pod
+#pod $range = Number::Tolerant::Union->new(10..15,20..25);
+#pod
+#pod ...while the following code expresses an actual range:
+#pod
+#pod $range = tolerance(10 => to => 15) | tolerance(20 => to => 25);
+#pod
+#pod =head1 THANKS
+#pod
+#pod Thanks to Yuval Kogman and #perl-qa for helping find the bizarre bug that drove
+#pod the minimum required perl up to 5.8
+#pod
+#pod Thanks to Tom Freedman, who reminded me that this code was fun to work on, and
+#pod also provided the initial implementation for the offset type.
+#pod
+#pod =cut
"1 +/- 0";
@@ -525,7 +525,7 @@ Number::Tolerant - tolerance ranges for inexact numbers
=head1 VERSION
-version 1.703
+version 1.705
=head1 SYNOPSIS
@@ -2,44 +2,44 @@ use strict;
use warnings;
package Test::Tolerant;
# ABSTRACT: test routines for testing numbers against tolerances
-$Test::Tolerant::VERSION = '1.703';
-# =head1 SYNOPSIS
-#
-# use Test::More;
-# use Test::Tolerant;
-#
-# my $total = rand(6) + rand(6) + rand(6);
-# is_tol(10, [ qw( 3 to 18 ) ], "got an acceptable result from random dice");
-#
-# done_testing;
-#
-# =head1 FUNCTIONS
-#
-# =head2 is_tol
-#
-# is_tol($want, $have_spec, $comment);
-#
-# C<is_tol> is the only routine provided by Test::Tolerant, and is exported by
-# default. It beahves like C<L<is|Test::More/is>> from Test::More, asserting
-# that two values must be equal, but it will always use numeric equality, and the
-# second argument is not always used as the right hand side of comparison
-# directly, but it used to produce a L<Number::Tolerant> to compare to.
-#
-# C<$have_spec> can be:
-#
-# * a Number::Tolerant object
-# * an arrayref of args to Number::Tolerant->new
-# * a string to be passed to Number::Tolerant->from_string
-# * a literal number falls under this group
-#
-# If the value is outside of spec, you'll get a diagnostic message something like
-# this:
-#
-# given value is outside acceptable tolerances
-# have: 3
-# want: 5 < x
-#
-# =cut
+$Test::Tolerant::VERSION = '1.705';
+#pod =head1 SYNOPSIS
+#pod
+#pod use Test::More;
+#pod use Test::Tolerant;
+#pod
+#pod my $total = rand(6) + rand(6) + rand(6);
+#pod is_tol(10, [ qw( 3 to 18 ) ], "got an acceptable result from random dice");
+#pod
+#pod done_testing;
+#pod
+#pod =head1 FUNCTIONS
+#pod
+#pod =head2 is_tol
+#pod
+#pod is_tol($have, $want_spec, $comment);
+#pod
+#pod C<is_tol> is the only routine provided by Test::Tolerant, and is exported by
+#pod default. It beahves like C<L<is|Test::More/is>> from Test::More, asserting
+#pod that two values must be equal, but it will always use numeric equality, and the
+#pod second argument is not always used as the right hand side of comparison
+#pod directly, but it used to produce a L<Number::Tolerant> to compare to.
+#pod
+#pod C<$have_spec> can be:
+#pod
+#pod * a Number::Tolerant object
+#pod * an arrayref of args to Number::Tolerant->new
+#pod * a string to be passed to Number::Tolerant->from_string
+#pod * a literal number falls under this group
+#pod
+#pod If the value is outside of spec, you'll get a diagnostic message something like
+#pod this:
+#pod
+#pod given value is outside acceptable tolerances
+#pod have: 3
+#pod want: 5 < x
+#pod
+#pod =cut
use Carp ();
use Number::Tolerant qw(tolerance);
@@ -98,7 +98,7 @@ Test::Tolerant - test routines for testing numbers against tolerances
=head1 VERSION
-version 1.703
+version 1.705
=head1 SYNOPSIS
@@ -114,7 +114,7 @@ version 1.703
=head2 is_tol
- is_tol($want, $have_spec, $comment);
+ is_tol($have, $want_spec, $comment);
C<is_tol> is the only routine provided by Test::Tolerant, and is exported by
default. It beahves like C<L<is|Test::More/is>> from Test::More, asserting
@@ -0,0 +1,42 @@
+do { my $x = {
+ 'configure' => {
+ 'requires' => {
+ 'ExtUtils::MakeMaker' => '0'
+ }
+ },
+ 'develop' => {
+ 'requires' => {
+ 'Test::Pod' => '1.41'
+ }
+ },
+ 'runtime' => {
+ 'requires' => {
+ 'Carp' => '0',
+ 'Math::BigFloat' => '0',
+ 'Math::BigRat' => '0',
+ 'Scalar::Util' => '0',
+ 'Sub::Exporter' => '0.950',
+ 'Sub::Exporter::Util' => '0',
+ 'Test::Builder' => '0',
+ 'overload' => '0',
+ 'parent' => '0',
+ 'strict' => '0',
+ 'warnings' => '0'
+ }
+ },
+ 'test' => {
+ 'recommends' => {
+ 'CPAN::Meta' => '2.120900'
+ },
+ 'requires' => {
+ 'ExtUtils::MakeMaker' => '0',
+ 'File::Spec' => '0',
+ 'Test::More' => '0.96',
+ 'Test::Tester' => '0',
+ 'base' => '0',
+ 'if' => '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,86 +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 = "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('Carp','any version') };
-eval { $v .= pmver('ExtUtils::MakeMaker','6.30') };
-eval { $v .= pmver('Math::BigFloat','any version') };
-eval { $v .= pmver('Math::BigRat','any version') };
-eval { $v .= pmver('Scalar::Util','any version') };
-eval { $v .= pmver('Sub::Exporter','0.950') };
-eval { $v .= pmver('Sub::Exporter::Util','any version') };
-eval { $v .= pmver('Test::Builder','any version') };
-eval { $v .= pmver('Test::More','0.96') };
-eval { $v .= pmver('Test::Tester','any version') };
-eval { $v .= pmver('base','any version') };
-eval { $v .= pmver('feature','any version') };
-eval { $v .= pmver('if','any version') };
-eval { $v .= pmver('overload','any version') };
-eval { $v .= pmver('parent','any version') };
-eval { $v .= pmver('strict','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;
@@ -7,7 +7,7 @@ BEGIN {
plan skip_all => "switch only in Perl 5.10 and newer"
if $^V lt v5.10.0;
}
-use feature qw<switch>;
+use if $] >= 5.010, feature => qw<switch>;
no if $] >= 5.018, warnings => "experimental::smartmatch";
use Number::Tolerant;
@@ -4,7 +4,7 @@ use Test::More tests => 2;
note 'Checking Changes';
my $changes_file = 'Changes';
-my $newver = '1.703';
+my $newver = '1.705';
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();