@@ -1,5 +1,8 @@
Revision history for Test-Fatal
+0.014 2014-12-09 18:35:59-05:00 America/New_York
+ - avoid assuming that t/todo.t is always called t/todo.t
+
0.013 2013-09-23 10:31:15 America/New_York
- rebuild to get a newer compile test that may work on 5.6.x
@@ -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.026.
Changes
LICENSE
MANIFEST
@@ -6,10 +7,11 @@ META.yml
Makefile.PL
README
dist.ini
+examples/convert-to-test-fatal
examples/exception_like.t
lib/Test/Fatal.pm
-t/00-compile.t
-t/000-report-versions-tiny.t
+t/00-report-prereqs.dd
+t/00-report-prereqs.t
t/basic.t
t/like-exception.t
t/todo.t
@@ -4,7 +4,7 @@
"Ricardo Signes <rjbs@cpan.org>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 4.300039, CPAN::Meta::Converter version 2.132620",
+ "generated_by" : "Dist::Zilla version 5.026, CPAN::Meta::Converter version 2.143240",
"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" : {
@@ -36,10 +35,12 @@
}
},
"test" : {
+ "recommends" : {
+ "CPAN::Meta" : "2.120900"
+ },
"requires" : {
+ "ExtUtils::MakeMaker" : "0",
"File::Spec" : "0",
- "IO::Handle" : "0",
- "IPC::Open3" : "0",
"Test::Builder::Tester" : "0",
"Test::More" : "0.96",
"overload" : "0"
@@ -58,156 +59,193 @@
"web" : "https://github.com/rjbs/Test-Fatal"
}
},
- "version" : "0.013",
+ "version" : "0.014",
"x_Dist_Zilla" : {
"perl" : {
- "version" : "5.019003"
+ "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.014"
+ "version" : "2.028"
},
{
"class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed",
"name" : "@RJBS/CheckPrereqsIndexed",
- "version" : "0.009"
+ "version" : "0.013"
},
{
"class" : "Dist::Zilla::Plugin::CheckExtraTests",
"name" : "@RJBS/CheckExtraTests",
- "version" : "0.011"
+ "version" : "0.025"
},
{
"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.005"
+ "version" : "0.032"
},
{
"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.005"
+ "version" : "0.032"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@RJBS/@Filter/PruneCruft",
- "version" : "4.300039"
+ "version" : "5.026"
},
{
"class" : "Dist::Zilla::Plugin::ManifestSkip",
"name" : "@RJBS/@Filter/ManifestSkip",
- "version" : "4.300039"
+ "version" : "5.026"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@RJBS/@Filter/MetaYAML",
- "version" : "4.300039"
+ "version" : "5.026"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@RJBS/@Filter/License",
- "version" : "4.300039"
+ "version" : "5.026"
},
{
"class" : "Dist::Zilla::Plugin::Readme",
"name" : "@RJBS/@Filter/Readme",
- "version" : "4.300039"
+ "version" : "5.026"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@RJBS/@Filter/ExecDir",
- "version" : "4.300039"
+ "version" : "5.026"
},
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@RJBS/@Filter/ShareDir",
- "version" : "4.300039"
- },
- {
- "class" : "Dist::Zilla::Plugin::MakeMaker",
- "name" : "@RJBS/@Filter/MakeMaker",
- "version" : "4.300039"
+ "version" : "5.026"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@RJBS/@Filter/Manifest",
- "version" : "4.300039"
+ "version" : "5.026"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@RJBS/@Filter/TestRelease",
- "version" : "4.300039"
+ "version" : "5.026"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@RJBS/@Filter/ConfirmRelease",
- "version" : "4.300039"
+ "version" : "5.026"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@RJBS/@Filter/UploadToCPAN",
- "version" : "4.300039"
+ "version" : "5.026"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::MakeMaker",
+ "config" : {
+ "Dist::Zilla::Role::TestRunner" : {
+ "default_jobs" : 9
+ }
+ },
+ "name" : "@RJBS/MakeMaker",
+ "version" : "5.026"
},
{
"class" : "Dist::Zilla::Plugin::AutoPrereqs",
"name" : "@RJBS/AutoPrereqs",
- "version" : "4.300039"
+ "version" : "5.026"
},
{
"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.028"
},
{
"class" : "Dist::Zilla::Plugin::PkgVersion",
"name" : "@RJBS/PkgVersion",
- "version" : "4.300039"
+ "version" : "5.026"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@RJBS/MetaConfig",
- "version" : "4.300039"
+ "version" : "5.026"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@RJBS/MetaJSON",
- "version" : "4.300039"
+ "version" : "5.026"
},
{
"class" : "Dist::Zilla::Plugin::NextRelease",
"name" : "@RJBS/NextRelease",
- "version" : "4.300039"
+ "version" : "5.026"
},
{
"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" : "4.300039"
+ "version" : "5.026"
},
{
- "class" : "Dist::Zilla::Plugin::ReportVersions::Tiny",
- "name" : "@RJBS/ReportVersions::Tiny",
- "version" : "1.09"
- },
- {
- "class" : "Dist::Zilla::Plugin::Test::Compile",
- "config" : {
- "Dist::Zilla::Plugin::Test::Compile" : {
- "module_finder" : [
- ":InstallModules"
- ],
- "script_finder" : [
- ":ExecFiles"
- ]
- }
- },
- "name" : "@RJBS/Test::Compile",
- "version" : "2.033"
+ "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs",
+ "name" : "@RJBS/Test::ReportPrereqs",
+ "version" : "0.019"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
@@ -218,67 +256,239 @@
}
},
"name" : "@RJBS/TestMoreWithSubtests",
- "version" : "4.300039"
+ "version" : "5.026"
},
{
"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.009"
+ },
+ {
+ "class" : "Pod::Weaver::Plugin::H1Nester",
+ "name" : "@CorePrep/H1Nester",
+ "version" : "4.009"
+ },
+ {
+ "class" : "Pod::Weaver::Plugin::SingleEncoding",
+ "name" : "@RJBS/SingleEncoding",
+ "version" : "4.009"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Name",
+ "name" : "@RJBS/Name",
+ "version" : "4.009"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Version",
+ "name" : "@RJBS/Version",
+ "version" : "4.009"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Region",
+ "name" : "@RJBS/Prelude",
+ "version" : "4.009"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Generic",
+ "name" : "@RJBS/Synopsis",
+ "version" : "4.009"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Generic",
+ "name" : "@RJBS/Description",
+ "version" : "4.009"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Generic",
+ "name" : "@RJBS/Overview",
+ "version" : "4.009"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Generic",
+ "name" : "@RJBS/Stability",
+ "version" : "4.009"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Collect",
+ "name" : "Attributes",
+ "version" : "4.009"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Collect",
+ "name" : "Methods",
+ "version" : "4.009"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Collect",
+ "name" : "Functions",
+ "version" : "4.009"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Leftovers",
+ "name" : "@RJBS/Leftovers",
+ "version" : "4.009"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Region",
+ "name" : "@RJBS/postlude",
+ "version" : "4.009"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Authors",
+ "name" : "@RJBS/Authors",
+ "version" : "4.009"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Legal",
+ "name" : "@RJBS/Legal",
+ "version" : "4.009"
+ },
+ {
+ "class" : "Pod::Weaver::Plugin::Transformer",
+ "name" : "@RJBS/List",
+ "version" : "4.009"
+ }
+ ]
+ }
+ },
"name" : "@RJBS/PodWeaver",
- "version" : "3.101642"
+ "version" : "4.006"
},
{
"class" : "Dist::Zilla::Plugin::GithubMeta",
"name" : "@RJBS/GithubMeta",
- "version" : "0.38"
+ "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.014"
+ "version" : "2.028"
},
{
"class" : "Dist::Zilla::Plugin::Git::Commit",
+ "config" : {
+ "Dist::Zilla::Plugin::Git::Commit" : {
+ "add_files_in" : [],
+ "commit_msg" : "v%v%n%n%c",
+ "time_zone" : "local"
+ },
+ "Dist::Zilla::Role::Git::DirtyFiles" : {
+ "allow_dirty" : [
+ "dist.ini",
+ "Changes"
+ ],
+ "allow_dirty_match" : [],
+ "changelog" : "Changes"
+ },
+ "Dist::Zilla::Role::Git::Repo" : {
+ "repo_root" : "."
+ }
+ },
"name" : "@RJBS/@Git/Commit",
- "version" : "2.014"
+ "version" : "2.028"
},
{
"class" : "Dist::Zilla::Plugin::Git::Tag",
+ "config" : {
+ "Dist::Zilla::Plugin::Git::Tag" : {
+ "branch" : null,
+ "signed" : 0,
+ "tag" : "0.014",
+ "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.028"
},
{
"class" : "Dist::Zilla::Plugin::Git::Push",
+ "config" : {
+ "Dist::Zilla::Plugin::Git::Push" : {
+ "push_to" : [
+ "origin :",
+ "github :"
+ ],
+ "remotes_must_exist" : 0
+ },
+ "Dist::Zilla::Role::Git::Repo" : {
+ "repo_root" : "."
+ }
+ },
"name" : "@RJBS/@Git/Push",
- "version" : "2.014"
+ "version" : "2.028"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
- "version" : "4.300039"
+ "version" : "5.026"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":IncModules",
- "version" : "4.300039"
+ "version" : "5.026"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
- "version" : "4.300039"
+ "version" : "5.026"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
- "version" : "4.300039"
+ "version" : "5.026"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
- "version" : "4.300039"
+ "version" : "5.026"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":MainModule",
- "version" : "4.300039"
+ "version" : "5.026"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::FinderCode",
+ "name" : ":AllFiles",
+ "version" : "5.026"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::FinderCode",
+ "name" : ":NoFiles",
+ "version" : "5.026"
}
],
"zilla" : {
@@ -286,7 +496,7 @@
"config" : {
"is_trial" : "0"
},
- "version" : "4.300039"
+ "version" : "5.026"
}
}
}
@@ -3,151 +3,178 @@ abstract: 'incredibly simple helpers for testing code with exceptions'
author:
- 'Ricardo Signes <rjbs@cpan.org>'
build_requires:
- File::Spec: 0
- IO::Handle: 0
- IPC::Open3: 0
- Test::Builder::Tester: 0
- Test::More: 0.96
- overload: 0
+ ExtUtils::MakeMaker: '0'
+ File::Spec: '0'
+ Test::Builder::Tester: '0'
+ Test::More: '0.96'
+ overload: '0'
configure_requires:
- ExtUtils::MakeMaker: 6.30
+ ExtUtils::MakeMaker: '0'
dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.300039, CPAN::Meta::Converter version 2.132620'
+generated_by: 'Dist::Zilla version 5.026, CPAN::Meta::Converter version 2.143240'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ version: '1.4'
name: Test-Fatal
requires:
- Carp: 0
- Exporter: 5.57
- Test::Builder: 0
- Try::Tiny: 0.07
- strict: 0
- warnings: 0
+ Carp: '0'
+ Exporter: '5.57'
+ Test::Builder: '0'
+ Try::Tiny: '0.07'
+ strict: '0'
+ warnings: '0'
resources:
bugtracker: https://github.com/rjbs/Test-Fatal/issues
homepage: https://github.com/rjbs/Test-Fatal
repository: https://github.com/rjbs/Test-Fatal.git
-version: 0.013
+version: '0.014'
x_Dist_Zilla:
perl:
- version: 5.019003
+ 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.014
+ version: '2.028'
-
class: Dist::Zilla::Plugin::CheckPrereqsIndexed
name: '@RJBS/CheckPrereqsIndexed'
- version: 0.009
+ version: '0.013'
-
class: Dist::Zilla::Plugin::CheckExtraTests
name: '@RJBS/CheckExtraTests'
- version: 0.011
+ version: '0.025'
-
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.005
+ version: '0.032'
-
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.005
+ version: '0.032'
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@RJBS/@Filter/PruneCruft'
- version: 4.300039
+ version: '5.026'
-
class: Dist::Zilla::Plugin::ManifestSkip
name: '@RJBS/@Filter/ManifestSkip'
- version: 4.300039
+ version: '5.026'
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@RJBS/@Filter/MetaYAML'
- version: 4.300039
+ version: '5.026'
-
class: Dist::Zilla::Plugin::License
name: '@RJBS/@Filter/License'
- version: 4.300039
+ version: '5.026'
-
class: Dist::Zilla::Plugin::Readme
name: '@RJBS/@Filter/Readme'
- version: 4.300039
+ version: '5.026'
-
class: Dist::Zilla::Plugin::ExecDir
name: '@RJBS/@Filter/ExecDir'
- version: 4.300039
+ version: '5.026'
-
class: Dist::Zilla::Plugin::ShareDir
name: '@RJBS/@Filter/ShareDir'
- version: 4.300039
- -
- class: Dist::Zilla::Plugin::MakeMaker
- name: '@RJBS/@Filter/MakeMaker'
- version: 4.300039
+ version: '5.026'
-
class: Dist::Zilla::Plugin::Manifest
name: '@RJBS/@Filter/Manifest'
- version: 4.300039
+ version: '5.026'
-
class: Dist::Zilla::Plugin::TestRelease
name: '@RJBS/@Filter/TestRelease'
- version: 4.300039
+ version: '5.026'
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@RJBS/@Filter/ConfirmRelease'
- version: 4.300039
+ version: '5.026'
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@RJBS/@Filter/UploadToCPAN'
- version: 4.300039
+ version: '5.026'
+ -
+ class: Dist::Zilla::Plugin::MakeMaker
+ config:
+ Dist::Zilla::Role::TestRunner:
+ default_jobs: 9
+ name: '@RJBS/MakeMaker'
+ version: '5.026'
-
class: Dist::Zilla::Plugin::AutoPrereqs
name: '@RJBS/AutoPrereqs'
- version: 4.300039
+ version: '5.026'
-
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.028'
-
class: Dist::Zilla::Plugin::PkgVersion
name: '@RJBS/PkgVersion'
- version: 4.300039
+ version: '5.026'
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@RJBS/MetaConfig'
- version: 4.300039
+ version: '5.026'
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@RJBS/MetaJSON'
- version: 4.300039
+ version: '5.026'
-
class: Dist::Zilla::Plugin::NextRelease
name: '@RJBS/NextRelease'
- version: 4.300039
+ version: '5.026'
-
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: 4.300039
+ version: '5.026'
-
- class: Dist::Zilla::Plugin::ReportVersions::Tiny
- name: '@RJBS/ReportVersions::Tiny'
- version: 1.09
- -
- class: Dist::Zilla::Plugin::Test::Compile
- config:
- Dist::Zilla::Plugin::Test::Compile:
- module_finder:
- - ':InstallModules'
- script_finder:
- - ':ExecFiles'
- name: '@RJBS/Test::Compile'
- version: 2.033
+ class: Dist::Zilla::Plugin::Test::ReportPrereqs
+ name: '@RJBS/Test::ReportPrereqs'
+ version: '0.019'
-
class: Dist::Zilla::Plugin::Prereqs
config:
@@ -155,57 +182,187 @@ x_Dist_Zilla:
phase: test
type: requires
name: '@RJBS/TestMoreWithSubtests'
- version: 4.300039
+ version: '5.026'
-
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.009'
+ -
+ class: Pod::Weaver::Plugin::H1Nester
+ name: '@CorePrep/H1Nester'
+ version: '4.009'
+ -
+ class: Pod::Weaver::Plugin::SingleEncoding
+ name: '@RJBS/SingleEncoding'
+ version: '4.009'
+ -
+ class: Pod::Weaver::Section::Name
+ name: '@RJBS/Name'
+ version: '4.009'
+ -
+ class: Pod::Weaver::Section::Version
+ name: '@RJBS/Version'
+ version: '4.009'
+ -
+ class: Pod::Weaver::Section::Region
+ name: '@RJBS/Prelude'
+ version: '4.009'
+ -
+ class: Pod::Weaver::Section::Generic
+ name: '@RJBS/Synopsis'
+ version: '4.009'
+ -
+ class: Pod::Weaver::Section::Generic
+ name: '@RJBS/Description'
+ version: '4.009'
+ -
+ class: Pod::Weaver::Section::Generic
+ name: '@RJBS/Overview'
+ version: '4.009'
+ -
+ class: Pod::Weaver::Section::Generic
+ name: '@RJBS/Stability'
+ version: '4.009'
+ -
+ class: Pod::Weaver::Section::Collect
+ name: Attributes
+ version: '4.009'
+ -
+ class: Pod::Weaver::Section::Collect
+ name: Methods
+ version: '4.009'
+ -
+ class: Pod::Weaver::Section::Collect
+ name: Functions
+ version: '4.009'
+ -
+ class: Pod::Weaver::Section::Leftovers
+ name: '@RJBS/Leftovers'
+ version: '4.009'
+ -
+ class: Pod::Weaver::Section::Region
+ name: '@RJBS/postlude'
+ version: '4.009'
+ -
+ class: Pod::Weaver::Section::Authors
+ name: '@RJBS/Authors'
+ version: '4.009'
+ -
+ class: Pod::Weaver::Section::Legal
+ name: '@RJBS/Legal'
+ version: '4.009'
+ -
+ class: Pod::Weaver::Plugin::Transformer
+ name: '@RJBS/List'
+ version: '4.009'
name: '@RJBS/PodWeaver'
- version: 3.101642
+ version: '4.006'
-
class: Dist::Zilla::Plugin::GithubMeta
name: '@RJBS/GithubMeta'
- version: 0.38
+ 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.014
+ version: '2.028'
-
class: Dist::Zilla::Plugin::Git::Commit
+ config:
+ Dist::Zilla::Plugin::Git::Commit:
+ add_files_in: []
+ commit_msg: v%v%n%n%c
+ time_zone: local
+ Dist::Zilla::Role::Git::DirtyFiles:
+ allow_dirty:
+ - dist.ini
+ - Changes
+ allow_dirty_match: []
+ changelog: Changes
+ Dist::Zilla::Role::Git::Repo:
+ repo_root: .
name: '@RJBS/@Git/Commit'
- version: 2.014
+ version: '2.028'
-
class: Dist::Zilla::Plugin::Git::Tag
+ config:
+ Dist::Zilla::Plugin::Git::Tag:
+ branch: ~
+ signed: 0
+ tag: '0.014'
+ 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.028'
-
class: Dist::Zilla::Plugin::Git::Push
+ config:
+ Dist::Zilla::Plugin::Git::Push:
+ push_to:
+ - 'origin :'
+ - 'github :'
+ remotes_must_exist: 0
+ Dist::Zilla::Role::Git::Repo:
+ repo_root: .
name: '@RJBS/@Git/Push'
- version: 2.014
+ version: '2.028'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
- version: 4.300039
+ version: '5.026'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':IncModules'
- version: 4.300039
+ version: '5.026'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
- version: 4.300039
+ version: '5.026'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
- version: 4.300039
+ version: '5.026'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
- version: 4.300039
+ version: '5.026'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':MainModule'
- version: 4.300039
+ version: '5.026'
+ -
+ class: Dist::Zilla::Plugin::FinderCode
+ name: ':AllFiles'
+ version: '5.026'
+ -
+ class: Dist::Zilla::Plugin::FinderCode
+ name: ':NoFiles'
+ version: '5.026'
zilla:
class: Dist::Zilla::Dist::Builder
config:
- is_trial: 0
- version: 4.300039
+ is_trial: '0'
+ version: '5.026'
@@ -1,19 +1,19 @@
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.026.
use strict;
use warnings;
-use ExtUtils::MakeMaker 6.30;
+use ExtUtils::MakeMaker;
my %WriteMakefileArgs = (
"ABSTRACT" => "incredibly simple helpers for testing code with exceptions",
"AUTHOR" => "Ricardo Signes <rjbs\@cpan.org>",
- "BUILD_REQUIRES" => {},
"CONFIGURE_REQUIRES" => {
- "ExtUtils::MakeMaker" => "6.30"
+ "ExtUtils::MakeMaker" => 0
},
"DISTNAME" => "Test-Fatal",
"EXE_FILES" => [],
@@ -28,44 +28,38 @@ my %WriteMakefileArgs = (
"warnings" => 0
},
"TEST_REQUIRES" => {
+ "ExtUtils::MakeMaker" => 0,
"File::Spec" => 0,
- "IO::Handle" => 0,
- "IPC::Open3" => 0,
"Test::Builder::Tester" => 0,
"Test::More" => "0.96",
"overload" => 0
},
- "VERSION" => "0.013",
+ "VERSION" => "0.014",
"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 = (
+ "Carp" => 0,
+ "Exporter" => "5.57",
+ "ExtUtils::MakeMaker" => 0,
+ "File::Spec" => 0,
+ "Test::Builder" => 0,
+ "Test::Builder::Tester" => 0,
+ "Test::More" => "0.96",
+ "Try::Tiny" => "0.07",
+ "overload" => 0,
+ "strict" => 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 Test-Fatal,
-version 0.013:
+version 0.014:
incredibly simple helpers for testing code with exceptions
@@ -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.026.
+
@@ -0,0 +1,128 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Path::Tiny;
+use PPI;
+
+rewrite_doc($_) for grep { -w } @ARGV;
+
+sub rewrite_doc {
+ my $file = shift;
+
+ my $doc = PPI::Document->new($file);
+
+ return unless $doc =~ /Test::Exception/;
+
+ print $file, "\n";
+
+ my $pattern = sub {
+ my $elt = $_[1];
+
+ return 1
+ if $elt->isa('PPI::Statement')
+ && $elt->content()
+ =~ /^\s*(?:::)?(?:lives_|throws_|dies_)(?:ok|and)/;
+
+ return 0;
+ };
+
+ for my $elt ( @{ $doc->find($pattern) || [] } ) {
+ transform_statement($elt);
+ }
+
+ my $content = $doc->content();
+ $content =~ s/Test::Exception/Test::Fatal/g;
+
+ path( $file )->spew( $content );
+}
+
+sub transform_statement {
+ my $stmt = shift;
+
+ my @children = $stmt->schildren;
+
+ my $func = shift @children;
+
+ my $colons = $func =~ /^::/ ? '::' : q{};
+
+ my $code;
+ if ( $func =~ /lives_/ ) {
+ $code = function(
+ $colons . 'is',
+ $children[0],
+ 'undef',
+ $children[1]
+ );
+ }
+ elsif ( $func =~ /dies_/ ) {
+ $code = function(
+ $colons . 'isnt',
+ $children[0],
+ 'undef',
+ $children[1]
+ );
+ }
+ elsif ( $func =~ /throws_/ ) {
+
+ # $children[2] is always a comma if it exists
+ if ( $children[1]->isa('PPI::Token::QuoteLike::Regexp') ) {
+ $code = function(
+ $colons . 'like',
+ $children[0],
+ $children[1],
+ $children[3]
+ );
+ }
+ else {
+ $code = function(
+ $colons . 'is',
+ $children[0],
+ $children[1],
+ $children[3]
+ );
+ }
+ }
+
+ $stmt->insert_before($code);
+ $stmt->remove;
+}
+
+sub function {
+ my $func = shift;
+ my $exception = shift;
+ my $expect = shift;
+ my $desc = shift;
+
+ my $exc_func = $func =~ /^::/ ? '::exception' : 'exception';
+
+ my @code;
+
+ push @code,
+ PPI::Token::Word->new($func),
+ PPI::Token::Structure->new('('),
+ PPI::Token::Whitespace->new(q{ }),
+ PPI::Token::Word->new($exc_func),
+ PPI::Token::Whitespace->new(q{ }),
+ $exception->clone,
+ PPI::Token::Operator->new(','),
+ PPI::Token::Whitespace->new(q{ }),
+ ( ref $expect ? $expect->clone : PPI::Token::Word->new($expect) );
+
+ if ( $desc && $desc->isa('PPI::Token::Quote') ) {
+ push @code, PPI::Token::Operator->new(','),
+ PPI::Token::Whitespace->new(q{ }),
+ $desc->clone;
+ }
+
+ push @code,
+ PPI::Token::Whitespace->new(q{ }),
+ PPI::Token::Structure->new(')'),
+ PPI::Token::Structure->new(';');
+
+ my $stmt = PPI::Statement->new;
+ $stmt->add_element($_) for @code;
+
+ return $stmt;
+}
@@ -1,11 +1,42 @@
use strict;
use warnings;
package Test::Fatal;
-{
- $Test::Fatal::VERSION = '0.013';
-}
# ABSTRACT: incredibly simple helpers for testing code with exceptions
-
+$Test::Fatal::VERSION = '0.014';
+#pod =head1 SYNOPSIS
+#pod
+#pod use Test::More;
+#pod use Test::Fatal;
+#pod
+#pod use System::Under::Test qw(might_die);
+#pod
+#pod is(
+#pod exception { might_die; },
+#pod undef,
+#pod "the code lived",
+#pod );
+#pod
+#pod like(
+#pod exception { might_die; },
+#pod qr/turns out it died/,
+#pod "the code died as expected",
+#pod );
+#pod
+#pod isa_ok(
+#pod exception { might_die; },
+#pod 'Exception::Whatever',
+#pod 'the thrown exception',
+#pod );
+#pod
+#pod =head1 DESCRIPTION
+#pod
+#pod Test::Fatal is an alternative to the popular L<Test::Exception>. It does much
+#pod less, but should allow greater flexibility in testing exception-throwing code
+#pod with about the same amount of typing.
+#pod
+#pod It exports one routine by default: C<exception>.
+#pod
+#pod =cut
use Carp ();
use Try::Tiny 0.07;
@@ -15,6 +46,59 @@ use Exporter 5.57 'import';
our @EXPORT = qw(exception);
our @EXPORT_OK = qw(exception success dies_ok lives_ok);
+#pod =func exception
+#pod
+#pod my $exception = exception { ... };
+#pod
+#pod C<exception> takes a bare block of code and returns the exception thrown by
+#pod that block. If no exception was thrown, it returns undef.
+#pod
+#pod B<Achtung!> If the block results in a I<false> exception, such as 0 or the
+#pod empty string, Test::Fatal itself will die. Since either of these cases
+#pod indicates a serious problem with the system under testing, this behavior is
+#pod considered a I<feature>. If you must test for these conditions, you should use
+#pod L<Try::Tiny>'s try/catch mechanism. (Try::Tiny is the underlying exception
+#pod handling system of Test::Fatal.)
+#pod
+#pod Note that there is no TAP assert being performed. In other words, no "ok" or
+#pod "not ok" line is emitted. It's up to you to use the rest of C<exception> in an
+#pod existing test like C<ok>, C<isa_ok>, C<is>, et cetera. Or you may wish to use
+#pod the C<dies_ok> and C<lives_ok> wrappers, which do provide TAP output.
+#pod
+#pod C<exception> does I<not> alter the stack presented to the called block, meaning
+#pod that if the exception returned has a stack trace, it will include some frames
+#pod between the code calling C<exception> and the thing throwing the exception.
+#pod This is considered a I<feature> because it avoids the occasionally twitchy
+#pod C<Sub::Uplevel> mechanism.
+#pod
+#pod B<Achtung!> This is not a great idea:
+#pod
+#pod sub exception_like(&$;$) {
+#pod my ($code, $pattern, $name) = @_;
+#pod like( &exception($code), $pattern, $name );
+#pod }
+#pod
+#pod exception_like(sub { }, qr/foo/, 'foo appears in the exception');
+#pod
+#pod If the code in the C<...> is going to throw a stack trace with the arguments to
+#pod each subroutine in its call stack (for example via C<Carp::confess>,
+#pod the test name, "foo appears in the exception" will itself be matched by the
+#pod regex. Instead, write this:
+#pod
+#pod like( exception { ... }, qr/foo/, 'foo appears in the exception' );
+#pod
+#pod B<Achtung>: One final bad idea:
+#pod
+#pod isnt( exception { ... }, undef, "my code died!");
+#pod
+#pod It's true that this tests that your code died, but you should really test that
+#pod it died I<for the right reason>. For example, if you make an unrelated mistake
+#pod in the block, like using the wrong dereference, your test will pass even though
+#pod the code to be tested isn't really run at all. If you're expecting an
+#pod inspectable exception with an identifier or class, test that. If you're
+#pod expecting a string exception, consider using C<like>.
+#pod
+#pod =cut
our ($REAL_TBL, $REAL_CALCULATED_TBL) = (1, 1);
@@ -52,6 +136,24 @@ sub exception (&) {
};
}
+#pod =func success
+#pod
+#pod try {
+#pod should_live;
+#pod } catch {
+#pod fail("boo, we died");
+#pod } success {
+#pod pass("hooray, we lived");
+#pod };
+#pod
+#pod C<success>, exported only by request, is a L<Try::Tiny> helper with semantics
+#pod identical to L<C<finally>|Try::Tiny/finally>, but the body of the block will
+#pod only be run if the C<try> block ran without error.
+#pod
+#pod Although almost any needed exception tests can be performed with C<exception>,
+#pod success blocks may sometimes help organize complex testing.
+#pod
+#pod =cut
sub success (&;@) {
my $code = shift;
@@ -61,6 +163,26 @@ sub success (&;@) {
}, @_ );
}
+#pod =func dies_ok
+#pod
+#pod =func lives_ok
+#pod
+#pod Exported only by request, these two functions run a given block of code, and
+#pod provide TAP output indicating if it did, or did not throw an exception.
+#pod These provide an easy upgrade path for replacing existing unit tests based on
+#pod C<Test::Exception>.
+#pod
+#pod RJBS does not suggest using this except as a convenience while porting tests to
+#pod use Test::Fatal's C<exception> routine.
+#pod
+#pod use Test::More tests => 2;
+#pod use Test::Fatal qw(dies_ok lives_ok);
+#pod
+#pod dies_ok { die "I failed" } 'code that fails';
+#pod
+#pod lives_ok { return "I'm still alive" } 'code that does not fail';
+#pod
+#pod =cut
my $Tester;
@@ -95,13 +217,15 @@ __END__
=pod
+=encoding UTF-8
+
=head1 NAME
Test::Fatal - incredibly simple helpers for testing code with exceptions
=head1 VERSION
-version 0.013
+version 0.014
=head1 SYNOPSIS
@@ -1,46 +0,0 @@
-use strict;
-use warnings;
-
-# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.033
-
-use Test::More tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
-
-
-
-my @module_files = (
- 'Test/Fatal.pm'
-);
-
-
-
-# no fake home requested
-
-use File::Spec;
-use IPC::Open3;
-use IO::Handle;
-
-my @warnings;
-for my $lib (@module_files)
-{
- # see L<perlfaq8/How can I capture STDERR from an external command?>
- open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";
- my $stderr = IO::Handle->new;
-
- my $pid = open3($stdin, '>&STDERR', $stderr, $^X, '-Mblib', '-e', "require q[$lib]");
- binmode $stderr, ':crlf' if $^O eq 'MSWin32';
- my @_warnings = <$stderr>;
- waitpid($pid, 0);
- is($? >> 8, 0, "$lib loaded ok");
-
- if (@_warnings)
- {
- warn @_warnings;
- push @warnings, @_warnings;
- }
-}
-
-
-
-is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING};
-
-
@@ -0,0 +1,36 @@
+do { my $x = {
+ 'configure' => {
+ 'requires' => {
+ 'ExtUtils::MakeMaker' => '0'
+ }
+ },
+ 'develop' => {
+ 'requires' => {
+ 'Test::Pod' => '1.41'
+ }
+ },
+ 'runtime' => {
+ 'requires' => {
+ 'Carp' => '0',
+ 'Exporter' => '5.57',
+ 'Test::Builder' => '0',
+ 'Try::Tiny' => '0.07',
+ 'strict' => '0',
+ 'warnings' => '0'
+ }
+ },
+ 'test' => {
+ 'recommends' => {
+ 'CPAN::Meta' => '2.120900'
+ },
+ 'requires' => {
+ 'ExtUtils::MakeMaker' => '0',
+ 'File::Spec' => '0',
+ 'Test::Builder::Tester' => '0',
+ 'Test::More' => '0.96',
+ 'overload' => '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,84 +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('Carp','any version') };
-eval { $v .= pmver('Exporter','5.57') };
-eval { $v .= pmver('ExtUtils::MakeMaker','6.30') };
-eval { $v .= pmver('File::Spec','any version') };
-eval { $v .= pmver('IO::Handle','any version') };
-eval { $v .= pmver('IPC::Open3','any version') };
-eval { $v .= pmver('Test::Builder','any version') };
-eval { $v .= pmver('Test::Builder::Tester','any version') };
-eval { $v .= pmver('Test::More','0.96') };
-eval { $v .= pmver('Test::Pod','1.41') };
-eval { $v .= pmver('Try::Tiny','0.07') };
-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;
@@ -7,12 +7,14 @@ use Test::Builder::Tester tests => 4;
use Test::More;
use Test::Fatal;
+my $file = __FILE__;
+
{
my $line = __LINE__ + 13;
my $out = <<FAIL;
not ok 1 - succeeded # TODO unimplemented
# Failed (TODO) test 'succeeded'
-# at t/todo.t line $line.
+# at $file line $line.
# got: '0'
# expected: '1'
ok 2 - no exceptions # TODO unimplemented
@@ -31,7 +33,7 @@ FAIL
my $out = <<FAIL;
not ok 1 - succeeded # TODO unimplemented
# Failed (TODO) test 'succeeded'
-# at t/todo.t line $line.
+# at $file line $line.
# got: '0'
# expected: '1'
ok 2 - no exceptions # TODO unimplemented
@@ -60,7 +62,7 @@ FAIL
my $out = <<FAIL;
not ok 1 - succeeded # TODO unimplemented
# Failed (TODO) test 'succeeded'
-# at t/todo.t line $line.
+# at $file line $line.
# got: '0'
# expected: '1'
ok 2 - no exceptions # TODO unimplemented
@@ -95,7 +97,7 @@ FAIL
my $out = <<FAIL;
not ok 1 - succeeded # TODO unimplemented
# Failed (TODO) test 'succeeded'
-# at t/todo.t line $line.
+# at $file line $line.
# got: '0'
# expected: '1'
ok 2 - no exceptions # TODO unimplemented
@@ -4,7 +4,7 @@ use Test::More tests => 2;
note 'Checking Changes';
my $changes_file = 'Changes';
-my $newver = '0.013';
+my $newver = '0.014';
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();