@@ -0,0 +1,100 @@
+## HOW TO CONTRIBUTE
+
+Thank you for considering contributing to this distribution. This file
+contains instructions that will help you work with the source code.
+
+The distribution is managed with Dist::Zilla. This means than many of the
+usual files you might expect are not in the repository, but are generated at
+release time (e.g. Makefile.PL).
+
+Generally, **you do not need Dist::Zilla to contribute patches**. You do need
+Dist::Zilla to create a tarball and/or install from the repository. See below
+for guidance.
+
+### Getting dependencies
+
+See the included `cpanfile` file for a list of dependencies. If you have
+App::cpanminus 1.6 or later installed, you can use `cpanm` to satisfy
+dependencies like this:
+
+ $ cpanm --installdeps .
+
+Otherwise, you can install Module::CPANfile 1.0002 or later and then satisfy
+dependencies with the regular `cpan` client and `cpanfile-dump`:
+
+ $ cpan `cpanfile-dump`
+
+### Running tests
+
+You can run tests directly using the `prove` tool:
+
+ $ prove -l
+ $ prove -lv t/some_test_file.t
+
+For most of my distributions, `prove` is entirely sufficient for you to test any
+patches you have. I use `prove` for 99% of my testing during development.
+
+### Code style and tidying
+
+Please try to match any existing coding style. If there is a `.perltidyrc`
+file, please install Perl::Tidy and use perltidy before submitting patches.
+
+If there is a `tidyall.ini` file, you can also install Code::TidyAll and run
+`tidyall` on a file or `tidyall -a` to tidy all files.
+
+### Patching documentation
+
+Much of the documentation Pod is generated at release time. Depending on the
+distribution, some of my documentation may be written in a Pod dialect called
+WikiDoc. (See Pod::WikiDoc on CPAN.)
+
+If you would like to submit a documentation edit, please limit yourself to the
+documentation you see.
+
+If you see typos or documentation issues in the generated docs, please
+email or open a bug ticket instead of patching.
+
+### Installing from the repository
+
+If you want to install directly from the repository, you need to have
+Dist::Zilla installed (see below). If this is a burden to you, I welcome
+patches against a CPAN tarball instead of the repository.
+
+### Installing and using Dist::Zilla
+
+Dist::Zilla is a very powerful authoring tool, optimized for maintaining a
+large number of distributions with a high degree of automation, but it has a
+large dependency chain, a bit of a learning curve and requires a number of
+author-specific plugins.
+
+To install it from CPAN, I recommend one of the following approaches for
+the quickest installation:
+
+ # using CPAN.pm, but bypassing non-functional pod tests
+ $ cpan TAP::Harness::Restricted
+ $ PERL_MM_USE_DEFAULT=1 HARNESS_CLASS=TAP::Harness::Restricted cpan Dist::Zilla
+
+ # using cpanm, bypassing *all* tests
+ $ cpanm -n Dist::Zilla
+
+In either case, it's probably going to take about 10 minutes. Go for a walk,
+go get a cup of your favorite beverage, take a bathroom break, or whatever.
+When you get back, Dist::Zilla should be ready for you.
+
+Then you need to install any plugins specific to this distribution:
+
+ $ cpan `dzil authordeps`
+ $ dzil authordeps | cpanm
+
+Once installed, here are some dzil commands you might try:
+
+ $ dzil build
+ $ dzil test
+ $ dzil xtest
+
+To install from the repository, use:
+
+ $ dzil install
+
+You can learn more about Dist::Zilla at http://dzil.org/
+
@@ -1,5 +1,11 @@
Revision history for CPAN-Testers-Report
+1.999002 2014-07-14 15:29:20-04:00 America/New_York
+
+ - modernized distribution meta files
+
+ - tidied code
+
1.999001 2010-07-26 16:22:22 EST5EDT
- removed 'base' pragam
@@ -1,4 +1,4 @@
-This software is Copyright (c) 2010 by David Golden.
+This software is Copyright (c) 2014 by David Golden.
This is free software, licensed under:
@@ -1,3 +1,5 @@
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.019.
+CONTRIBUTING
Changes
LICENSE
MANIFEST
@@ -6,6 +8,7 @@ META.yml
Makefile.PL
README
Todo
+cpanfile
dist.ini
lib/CPAN/Testers/Fact/InstalledModules.pm
lib/CPAN/Testers/Fact/LegacyReport.pm
@@ -16,9 +19,16 @@ lib/CPAN/Testers/Fact/TestOutput.pm
lib/CPAN/Testers/Fact/TestSummary.pm
lib/CPAN/Testers/Fact/TesterComment.pm
lib/CPAN/Testers/Report.pm
-t/00-compile.t
+perlcritic.rc
+t/00-report-prereqs.t
t/01-CPAN-Testers-Report.t
+tidyall.ini
+xt/author/00-compile.t
+xt/author/critic.t
+xt/author/pod-spell.t
xt/release/distmeta.t
+xt/release/minimum-version.t
xt/release/pod-coverage.t
xt/release/pod-syntax.t
xt/release/portability.t
+xt/release/test-version.t
@@ -4,7 +4,7 @@
"David Golden <dagolden@cpan.org>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 4.101831, CPAN::Meta::Converter version 2.101670",
+ "generated_by" : "Dist::Zilla version 5.019, CPAN::Meta::Converter version 2.141170",
"license" : [
"apache_2_0"
],
@@ -19,75 +19,112 @@
"xt",
"examples",
"corpus"
+ ],
+ "package" : [
+ "DB"
]
},
"prereqs" : {
"configure" : {
"requires" : {
- "ExtUtils::MakeMaker" : "6.31"
+ "ExtUtils::MakeMaker" : "6.17"
+ }
+ },
+ "develop" : {
+ "requires" : {
+ "Dist::Zilla" : "5",
+ "Dist::Zilla::PluginBundle::DAGOLDEN" : "0.060",
+ "File::Spec" : "0",
+ "File::Temp" : "0",
+ "IO::Handle" : "0",
+ "IPC::Open3" : "0",
+ "Pod::Coverage::TrustPod" : "0",
+ "Test::CPAN::Meta" : "0",
+ "Test::More" : "0",
+ "Test::Pod" : "1.41",
+ "Test::Pod::Coverage" : "1.08",
+ "Test::Spelling" : "0.12"
}
},
"runtime" : {
"requires" : {
- "Carp" : 0,
+ "Carp" : "0",
"Metabase::Fact::Hash" : "0.016",
"Metabase::Fact::String" : "0.016",
"Metabase::Report" : "0.016",
- "perl" : "5.006"
+ "perl" : "5.006",
+ "strict" : "0",
+ "warnings" : "0"
}
},
"test" : {
+ "recommends" : {
+ "CPAN::Meta" : "0",
+ "CPAN::Meta::Requirements" : "2.120900"
+ },
"requires" : {
- "File::Find" : 0,
- "File::Temp" : 0,
- "Test::More" : "0.88"
+ "ExtUtils::MakeMaker" : "0",
+ "File::Spec::Functions" : "0",
+ "List::Util" : "0",
+ "Test::More" : "0.88",
+ "version" : "0"
}
}
},
"provides" : {
"CPAN::Testers::Fact::InstalledModules" : {
"file" : "lib/CPAN/Testers/Fact/InstalledModules.pm",
- "version" : "1.999001"
+ "version" : "1.999002"
},
"CPAN::Testers::Fact::LegacyReport" : {
"file" : "lib/CPAN/Testers/Fact/LegacyReport.pm",
- "version" : "1.999001"
+ "version" : "1.999002"
},
"CPAN::Testers::Fact::PerlConfig" : {
"file" : "lib/CPAN/Testers/Fact/PerlConfig.pm",
- "version" : "1.999001"
+ "version" : "1.999002"
},
"CPAN::Testers::Fact::Prereqs" : {
"file" : "lib/CPAN/Testers/Fact/Prereqs.pm",
- "version" : "1.999001"
+ "version" : "1.999002"
},
"CPAN::Testers::Fact::TestEnvironment" : {
"file" : "lib/CPAN/Testers/Fact/TestEnvironment.pm",
- "version" : "1.999001"
+ "version" : "1.999002"
},
"CPAN::Testers::Fact::TestOutput" : {
"file" : "lib/CPAN/Testers/Fact/TestOutput.pm",
- "version" : "1.999001"
+ "version" : "1.999002"
},
"CPAN::Testers::Fact::TestSummary" : {
"file" : "lib/CPAN/Testers/Fact/TestSummary.pm",
- "version" : "1.999001"
+ "version" : "1.999002"
},
"CPAN::Testers::Fact::TesterComment" : {
"file" : "lib/CPAN/Testers/Fact/TesterComment.pm",
- "version" : "1.999001"
+ "version" : "1.999002"
},
"CPAN::Testers::Report" : {
"file" : "lib/CPAN/Testers/Report.pm",
- "version" : "1.999001"
+ "version" : "1.999002"
}
},
"release_status" : "stable",
"resources" : {
+ "bugtracker" : {
+ "web" : "https://github.com/dagolden/CPAN-Testers-Report/issues"
+ },
+ "homepage" : "https://github.com/dagolden/CPAN-Testers-Report",
"repository" : {
- "url" : "http://github.com/dagolden/cpan-testers-report"
+ "type" : "git",
+ "url" : "https://github.com/dagolden/CPAN-Testers-Report.git",
+ "web" : "https://github.com/dagolden/CPAN-Testers-Report"
}
},
- "version" : "1.999001"
+ "version" : "1.999002",
+ "x_authority" : "cpan:DAGOLDEN",
+ "x_contributors" : [
+ "David Steinbrunner <dsteinbrunner@pobox.com>"
+ ]
}
@@ -3,17 +3,19 @@ abstract: 'CPAN Testers report object'
author:
- 'David Golden <dagolden@cpan.org>'
build_requires:
- File::Find: 0
- File::Temp: 0
- Test::More: 0.88
+ ExtUtils::MakeMaker: '0'
+ File::Spec::Functions: '0'
+ List::Util: '0'
+ Test::More: '0.88'
+ version: '0'
configure_requires:
- ExtUtils::MakeMaker: 6.31
+ ExtUtils::MakeMaker: '6.17'
dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.101831, CPAN::Meta::Converter version 2.101670'
+generated_by: 'Dist::Zilla version 5.019, CPAN::Meta::Converter version 2.141170'
license: apache
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ version: '1.4'
name: CPAN-Testers-Report
no_index:
directory:
@@ -21,40 +23,49 @@ no_index:
- xt
- examples
- corpus
+ package:
+ - DB
provides:
CPAN::Testers::Fact::InstalledModules:
file: lib/CPAN/Testers/Fact/InstalledModules.pm
- version: 1.999001
+ version: '1.999002'
CPAN::Testers::Fact::LegacyReport:
file: lib/CPAN/Testers/Fact/LegacyReport.pm
- version: 1.999001
+ version: '1.999002'
CPAN::Testers::Fact::PerlConfig:
file: lib/CPAN/Testers/Fact/PerlConfig.pm
- version: 1.999001
+ version: '1.999002'
CPAN::Testers::Fact::Prereqs:
file: lib/CPAN/Testers/Fact/Prereqs.pm
- version: 1.999001
+ version: '1.999002'
CPAN::Testers::Fact::TestEnvironment:
file: lib/CPAN/Testers/Fact/TestEnvironment.pm
- version: 1.999001
+ version: '1.999002'
CPAN::Testers::Fact::TestOutput:
file: lib/CPAN/Testers/Fact/TestOutput.pm
- version: 1.999001
+ version: '1.999002'
CPAN::Testers::Fact::TestSummary:
file: lib/CPAN/Testers/Fact/TestSummary.pm
- version: 1.999001
+ version: '1.999002'
CPAN::Testers::Fact::TesterComment:
file: lib/CPAN/Testers/Fact/TesterComment.pm
- version: 1.999001
+ version: '1.999002'
CPAN::Testers::Report:
file: lib/CPAN/Testers/Report.pm
- version: 1.999001
+ version: '1.999002'
requires:
- Carp: 0
- Metabase::Fact::Hash: 0.016
- Metabase::Fact::String: 0.016
- Metabase::Report: 0.016
- perl: 5.006
+ Carp: '0'
+ Metabase::Fact::Hash: '0.016'
+ Metabase::Fact::String: '0.016'
+ Metabase::Report: '0.016'
+ perl: '5.006'
+ strict: '0'
+ warnings: '0'
resources:
- repository: http://github.com/dagolden/cpan-testers-report
-version: 1.999001
+ bugtracker: https://github.com/dagolden/CPAN-Testers-Report/issues
+ homepage: https://github.com/dagolden/CPAN-Testers-Report
+ repository: https://github.com/dagolden/CPAN-Testers-Report.git
+version: '1.999002'
+x_authority: cpan:DAGOLDEN
+x_contributors:
+ - 'David Steinbrunner <dsteinbrunner@pobox.com>'
@@ -1,52 +1,65 @@
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.019.
use strict;
use warnings;
-BEGIN { require 5.006; }
+use 5.006;
-use ExtUtils::MakeMaker 6.31;
+use ExtUtils::MakeMaker 6.17;
my %WriteMakefileArgs = (
- 'ABSTRACT' => 'CPAN Testers report object',
- 'AUTHOR' => 'David Golden <dagolden@cpan.org>',
- 'BUILD_REQUIRES' => {
- 'File::Find' => '0',
- 'File::Temp' => '0',
- 'Test::More' => '0.88'
+ "ABSTRACT" => "CPAN Testers report object",
+ "AUTHOR" => "David Golden <dagolden\@cpan.org>",
+ "CONFIGURE_REQUIRES" => {
+ "ExtUtils::MakeMaker" => "6.17"
},
- 'CONFIGURE_REQUIRES' => {
- 'ExtUtils::MakeMaker' => '6.31'
+ "DISTNAME" => "CPAN-Testers-Report",
+ "EXE_FILES" => [],
+ "LICENSE" => "apache",
+ "NAME" => "CPAN::Testers::Report",
+ "PREREQ_PM" => {
+ "Carp" => 0,
+ "Metabase::Fact::Hash" => "0.016",
+ "Metabase::Fact::String" => "0.016",
+ "Metabase::Report" => "0.016",
+ "strict" => 0,
+ "warnings" => 0
},
- 'DISTNAME' => 'CPAN-Testers-Report',
- 'EXE_FILES' => [],
- 'LICENSE' => 'apache',
- 'NAME' => 'CPAN::Testers::Report',
- 'PREREQ_PM' => {
- 'Carp' => '0',
- 'Metabase::Fact::Hash' => '0.016',
- 'Metabase::Fact::String' => '0.016',
- 'Metabase::Report' => '0.016'
+ "TEST_REQUIRES" => {
+ "ExtUtils::MakeMaker" => 0,
+ "File::Spec::Functions" => 0,
+ "List::Util" => 0,
+ "Test::More" => "0.88",
+ "version" => 0
},
- 'VERSION' => '1.999001',
- 'test' => {
- 'TESTS' => 't/*.t'
+ "VERSION" => "1.999002",
+ "test" => {
+ "TESTS" => "t/*.t"
}
);
-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};
- }
- }
+my %FallbackPrereqs = (
+ "Carp" => 0,
+ "ExtUtils::MakeMaker" => 0,
+ "File::Spec::Functions" => 0,
+ "List::Util" => 0,
+ "Metabase::Fact::Hash" => "0.016",
+ "Metabase::Fact::String" => "0.016",
+ "Metabase::Report" => "0.016",
+ "Test::More" => "0.88",
+ "strict" => 0,
+ "version" => 0,
+ "warnings" => 0
+);
+
+
+unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
+ delete $WriteMakefileArgs{TEST_REQUIRES};
+ delete $WriteMakefileArgs{BUILD_REQUIRES};
+ $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
}
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
@@ -2,7 +2,7 @@ NAME
CPAN::Testers::Report - CPAN Testers report object
VERSION
- version 1.999001
+ version 1.999002
SYNOPSIS
my $report = CPAN::Testers::Report->open(
@@ -30,7 +30,7 @@ DESCRIPTION
Metabase report class encapsulating Facts about a CPAN Testers report
USAGE
- CPAN::Testers::Report subclases Metabase::Report. See that module for
+ CPAN::Testers::Report subclasses Metabase::Report. See that module for
API. See Test::Reporter::Transport::Metabase for an example of usage.
BUGS
@@ -41,11 +41,28 @@ BUGS
When submitting a bug or request, please include a test-file or a patch
to an existing test-file that illustrates the bug or desired feature.
+SUPPORT
+ Bugs / Feature Requests
+ Please report any bugs or feature requests through the issue tracker at
+ <https://github.com/dagolden/CPAN-Testers-Report/issues>. You will be
+ notified automatically of any progress on your issue.
+
+ Source Code
+ This is open source software. The code repository is available for
+ public review and contribution under the terms of the license.
+
+ <https://github.com/dagolden/CPAN-Testers-Report>
+
+ git clone https://github.com/dagolden/CPAN-Testers-Report.git
+
AUTHOR
- David Golden <dagolden@cpan.org>
+ David Golden <dagolden@cpan.org>
+
+CONTRIBUTOR
+ David Steinbrunner <dsteinbrunner@pobox.com>
COPYRIGHT AND LICENSE
- This software is Copyright (c) 2010 by David Golden.
+ This software is Copyright (c) 2014 by David Golden.
This is free software, licensed under:
@@ -0,0 +1,39 @@
+requires "Carp" => "0";
+requires "Metabase::Fact::Hash" => "0.016";
+requires "Metabase::Fact::String" => "0.016";
+requires "Metabase::Report" => "0.016";
+requires "perl" => "5.006";
+requires "strict" => "0";
+requires "warnings" => "0";
+
+on 'test' => sub {
+ requires "ExtUtils::MakeMaker" => "0";
+ requires "File::Spec::Functions" => "0";
+ requires "List::Util" => "0";
+ requires "Test::More" => "0.88";
+ requires "version" => "0";
+};
+
+on 'test' => sub {
+ recommends "CPAN::Meta" => "0";
+ recommends "CPAN::Meta::Requirements" => "2.120900";
+};
+
+on 'configure' => sub {
+ requires "ExtUtils::MakeMaker" => "6.17";
+};
+
+on 'develop' => sub {
+ requires "Dist::Zilla" => "5";
+ requires "Dist::Zilla::PluginBundle::DAGOLDEN" => "0.060";
+ requires "File::Spec" => "0";
+ requires "File::Temp" => "0";
+ requires "IO::Handle" => "0";
+ requires "IPC::Open3" => "0";
+ requires "Pod::Coverage::TrustPod" => "0";
+ requires "Test::CPAN::Meta" => "0";
+ requires "Test::More" => "0";
+ requires "Test::Pod" => "1.41";
+ requires "Test::Pod::Coverage" => "1.08";
+ requires "Test::Spelling" => "0.12";
+};
@@ -4,5 +4,7 @@ license = Apache_2_0
copyright_holder = David Golden
[@DAGOLDEN]
-git_remote=github
-
+:version = 0.060
+stopwords = metabase
+stopwords = todo
+stopwords = submodules
@@ -1,50 +1,42 @@
-#
-# This file is part of CPAN-Testers-Report
-#
-# This software is Copyright (c) 2010 by David Golden.
-#
-# This is free software, licensed under:
-#
-# The Apache License, Version 2.0, January 2004
-#
use 5.006;
use strict;
use warnings;
+
package CPAN::Testers::Fact::InstalledModules;
-BEGIN {
- $CPAN::Testers::Fact::InstalledModules::VERSION = '1.999001';
-}
# ABSTRACT: Versions of particular modules installed on a system
+our $VERSION = '1.999002'; # VERSION
use Carp ();
use Metabase::Fact::Hash 0.016;
our @ISA = qw/Metabase::Fact::Hash/;
-sub optional_keys { qw/prereqs toolchain undeclared/ };
+sub optional_keys { qw/prereqs toolchain undeclared/ }
sub validate_content {
- my ($self) = @_;
- $self->SUPER::validate_content;
- my $content = $self->content;
- for my $key ( keys %$content ) {
- Carp::croak "key '$key' must be a hashref" unless ref $content->{$key} eq 'HASH';
- }
+ my ($self) = @_;
+ $self->SUPER::validate_content;
+ my $content = $self->content;
+ for my $key ( keys %$content ) {
+ Carp::croak "key '$key' must be a hashref" unless ref $content->{$key} eq 'HASH';
+ }
}
1;
-
+__END__
=pod
+=encoding UTF-8
+
=head1 NAME
CPAN::Testers::Fact::InstalledModules - Versions of particular modules installed on a system
=head1 VERSION
-version 1.999001
+version 1.999002
=head1 SYNOPSIS
@@ -75,12 +67,12 @@ as being used by the distribution, but that were not listed explicitly as
prerequisites. This will often be core modules or submodules, but could
include missing dependencies.
-=for Pod::Coverage optional_keys
-
=head1 USAGE
See L<Metabase::Fact>.
+=for Pod::Coverage optional_keys
+
=head1 BUGS
Please report any bugs or feature using the CPAN Request Tracker.
@@ -92,20 +84,14 @@ existing test-file that illustrates the bug or desired feature.
=head1 AUTHOR
- David Golden <dagolden@cpan.org>
+David Golden <dagolden@cpan.org>
=head1 COPYRIGHT AND LICENSE
-This software is Copyright (c) 2010 by David Golden.
+This software is Copyright (c) 2014 by David Golden.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
=cut
-
-
-__END__
-
-
-
@@ -1,20 +1,10 @@
-#
-# This file is part of CPAN-Testers-Report
-#
-# This software is Copyright (c) 2010 by David Golden.
-#
-# This is free software, licensed under:
-#
-# The Apache License, Version 2.0, January 2004
-#
use 5.006;
use strict;
use warnings;
+
package CPAN::Testers::Fact::LegacyReport;
-BEGIN {
- $CPAN::Testers::Fact::LegacyReport::VERSION = '1.999001';
-}
# ABSTRACT: an email-style report for CPAN Testers
+our $VERSION = '1.999002'; # VERSION
use Carp ();
@@ -24,40 +14,42 @@ our @ISA = qw/Metabase::Fact::Hash/;
sub required_keys { qw/grade osname osversion archname perl_version textreport/ }
sub content_metadata {
- my ($self) = @_;
- my $content = $self->content;
- return {
- grade => $content->{grade},
- osname => $content->{osname},
- osversion => $content->{osversion},
- archname => $content->{archname},
- perl_version => $content->{perl_version},
- };
+ my ($self) = @_;
+ my $content = $self->content;
+ return {
+ grade => $content->{grade},
+ osname => $content->{osname},
+ osversion => $content->{osversion},
+ archname => $content->{archname},
+ perl_version => $content->{perl_version},
+ };
}
-
+
sub content_metadata_types {
- return {
- grade => '//str',
- osname => '//str',
- osversion => '//str',
- archname => '//str',
- perl_version => '//str',
- };
+ return {
+ grade => '//str',
+ osname => '//str',
+ osversion => '//str',
+ archname => '//str',
+ perl_version => '//str',
+ };
}
-
-1;
+1;
+__END__
=pod
+=encoding UTF-8
+
=head1 NAME
CPAN::Testers::Fact::LegacyReport - an email-style report for CPAN Testers
=head1 VERSION
-version 1.999001
+version 1.999002
=head1 SYNOPSIS
@@ -80,12 +72,12 @@ version 1.999001
Wraps up old-style CPAN Testers report
-=for Pod::Coverage required_keys
-
=head1 USAGE
See L<Metabase::Fact>.
+=for Pod::Coverage required_keys
+
=head1 BUGS
Please report any bugs or feature using the CPAN Request Tracker.
@@ -97,19 +89,14 @@ existing test-file that illustrates the bug or desired feature.
=head1 AUTHOR
- David Golden <dagolden@cpan.org>
+David Golden <dagolden@cpan.org>
=head1 COPYRIGHT AND LICENSE
-This software is Copyright (c) 2010 by David Golden.
+This software is Copyright (c) 2014 by David Golden.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
=cut
-
-
-__END__
-
-
@@ -1,20 +1,10 @@
-#
-# This file is part of CPAN-Testers-Report
-#
-# This software is Copyright (c) 2010 by David Golden.
-#
-# This is free software, licensed under:
-#
-# The Apache License, Version 2.0, January 2004
-#
use 5.006;
use strict;
use warnings;
+
package CPAN::Testers::Fact::PerlConfig;
-BEGIN {
- $CPAN::Testers::Fact::PerlConfig::VERSION = '1.999001';
-}
# ABSTRACT: Perl build and configuration information for a CPAN Testers report
+our $VERSION = '1.999002'; # VERSION
use Carp ();
@@ -23,38 +13,40 @@ our @ISA = qw/Metabase::Fact::Hash/;
sub required_keys { return qw/build config/ }
-# XXX replace this with whatever Tux says is useful -- dagolden, 2009-03-30
+# XXX replace this with whatever Tux says is useful -- dagolden, 2009-03-30
sub content_metadata {
- my ($self) = @_;
- my $content = $self->content;
- return {
- osname => $content->{config}{osname},
- archname => $content->{config}{archname},
- version => $content->{config}{version},
- }
+ my ($self) = @_;
+ my $content = $self->content;
+ return {
+ osname => $content->{config}{osname},
+ archname => $content->{config}{archname},
+ version => $content->{config}{version},
+ };
}
-
+
sub content_metadata_types {
- return {
- osname => '//str',
- archname => '//str',
- version => '//str',
- }
+ return {
+ osname => '//str',
+ archname => '//str',
+ version => '//str',
+ };
}
-
-1;
+1;
+__END__
=pod
+=encoding UTF-8
+
=head1 NAME
CPAN::Testers::Fact::PerlConfig - Perl build and configuration information for a CPAN Testers report
=head1 VERSION
-version 1.999001
+version 1.999002
=head1 SYNOPSIS
@@ -73,12 +65,12 @@ version 1.999001
Summarize perl build and config from a CPAN testers run
-=for Pod::Coverage required_keys
-
=head1 USAGE
See L<Metabase::Fact>.
+=for Pod::Coverage required_keys
+
=head1 BUGS
Please report any bugs or feature using the CPAN Request Tracker.
@@ -90,20 +82,14 @@ existing test-file that illustrates the bug or desired feature.
=head1 AUTHOR
- David Golden <dagolden@cpan.org>
+David Golden <dagolden@cpan.org>
=head1 COPYRIGHT AND LICENSE
-This software is Copyright (c) 2010 by David Golden.
+This software is Copyright (c) 2014 by David Golden.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
=cut
-
-
-__END__
-
-
-
@@ -1,20 +1,10 @@
-#
-# This file is part of CPAN-Testers-Report
-#
-# This software is Copyright (c) 2010 by David Golden.
-#
-# This is free software, licensed under:
-#
-# The Apache License, Version 2.0, January 2004
-#
use 5.006;
use strict;
use warnings;
+
package CPAN::Testers::Fact::Prereqs;
-BEGIN {
- $CPAN::Testers::Fact::Prereqs::VERSION = '1.999001';
-}
# ABSTRACT: prerequisites detected in running a CPAN Testers report
+our $VERSION = '1.999002'; # VERSION
use Carp ();
@@ -24,27 +14,29 @@ our @ISA = qw/Metabase::Fact::Hash/;
sub optional_keys { qw/configure_requires requires build_requires/ }
sub validate_content {
- my ($self) = @_;
- $self->SUPER::validate_content;
- my $content = $self->content;
- for my $key ( keys %$content ) {
- Carp::croak "key '$key' must be a hashref" unless ref $content->{$key} eq 'HASH';
- }
+ my ($self) = @_;
+ $self->SUPER::validate_content;
+ my $content = $self->content;
+ for my $key ( keys %$content ) {
+ Carp::croak "key '$key' must be a hashref" unless ref $content->{$key} eq 'HASH';
+ }
}
1;
-
+__END__
=pod
+=encoding UTF-8
+
=head1 NAME
CPAN::Testers::Fact::Prereqs - prerequisites detected in running a CPAN Testers report
=head1 VERSION
-version 1.999001
+version 1.999002
=head1 SYNOPSIS
@@ -69,15 +61,15 @@ version 1.999001
Prerequisites detected. There are three valid types: configure_requires, requires,
and build_requires.
-The prerequisite must be a version number or logical comparision as defined in the
+The prerequisite must be a version number or logical comparison as defined in the
META.yml specification document.
-=for Pod::Coverage optional_keys
-
=head1 USAGE
See L<Metabase::Fact>.
+=for Pod::Coverage optional_keys
+
=head1 BUGS
Please report any bugs or feature using the CPAN Request Tracker.
@@ -89,21 +81,14 @@ existing test-file that illustrates the bug or desired feature.
=head1 AUTHOR
- David Golden <dagolden@cpan.org>
+David Golden <dagolden@cpan.org>
=head1 COPYRIGHT AND LICENSE
-This software is Copyright (c) 2010 by David Golden.
+This software is Copyright (c) 2014 by David Golden.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
=cut
-
-
-__END__
-
-
-
-
@@ -1,20 +1,10 @@
-#
-# This file is part of CPAN-Testers-Report
-#
-# This software is Copyright (c) 2010 by David Golden.
-#
-# This is free software, licensed under:
-#
-# The Apache License, Version 2.0, January 2004
-#
use 5.006;
use strict;
use warnings;
+
package CPAN::Testers::Fact::TestEnvironment;
-BEGIN {
- $CPAN::Testers::Fact::TestEnvironment::VERSION = '1.999001';
-}
# ABSTRACT: Environment vars and other local context during a CPAN Testers report
+our $VERSION = '1.999002'; # VERSION
use Carp ();
@@ -22,33 +12,35 @@ use Metabase::Fact::Hash 0.016;
our @ISA = qw/Metabase::Fact::Hash/;
# special_vars: $^X, UID/EID, GID/EGID, win32 stuff from CPAN::Reporter
-# -- dagolden, 2009-03-30
+# -- dagolden, 2009-03-30
sub optional_keys { qw/environment_vars special_vars/ }
sub validate_content {
- my ($self) = @_;
- $self->SUPER::validate_content;
- my $content = $self->content;
- for my $key ( keys %$content ) {
- Carp::croak "key '$key' must be a hashref" unless ref $content->{$key} eq 'HASH';
- }
+ my ($self) = @_;
+ $self->SUPER::validate_content;
+ my $content = $self->content;
+ for my $key ( keys %$content ) {
+ Carp::croak "key '$key' must be a hashref" unless ref $content->{$key} eq 'HASH';
+ }
}
# XXX do we want content_metadata? -- dagolden, 2009-03-30
-
-1;
+1;
+__END__
=pod
+=encoding UTF-8
+
=head1 NAME
CPAN::Testers::Fact::TestEnvironment - Environment vars and other local context during a CPAN Testers report
=head1 VERSION
-version 1.999001
+version 1.999002
=head1 SYNOPSIS
@@ -70,12 +62,12 @@ version 1.999001
Describes aspects of the environment during a CPAN Testers run.
-=for Pod::Coverage optional_keys
-
=head1 USAGE
See L<Metabase::Fact>.
+=for Pod::Coverage optional_keys
+
=head1 BUGS
Please report any bugs or feature using the CPAN Request Tracker.
@@ -87,20 +79,14 @@ existing test-file that illustrates the bug or desired feature.
=head1 AUTHOR
- David Golden <dagolden@cpan.org>
+David Golden <dagolden@cpan.org>
=head1 COPYRIGHT AND LICENSE
-This software is Copyright (c) 2010 by David Golden.
+This software is Copyright (c) 2014 by David Golden.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
=cut
-
-
-__END__
-
-
-
@@ -1,20 +1,10 @@
-#
-# This file is part of CPAN-Testers-Report
-#
-# This software is Copyright (c) 2010 by David Golden.
-#
-# This is free software, licensed under:
-#
-# The Apache License, Version 2.0, January 2004
-#
use 5.006;
use strict;
use warnings;
+
package CPAN::Testers::Fact::TestOutput;
-BEGIN {
- $CPAN::Testers::Fact::TestOutput::VERSION = '1.999001';
-}
# ABSTRACT: output from configuration, build and test
+our $VERSION = '1.999002'; # VERSION
use Carp ();
@@ -22,20 +12,22 @@ use Metabase::Fact::Hash 0.016;
our @ISA = qw/Metabase::Fact::Hash/;
sub optional_keys { qw/configure build test/ }
-
-1;
+1;
+__END__
=pod
+=encoding UTF-8
+
=head1 NAME
CPAN::Testers::Fact::TestOutput - output from configuration, build and test
=head1 VERSION
-version 1.999001
+version 1.999002
=head1 SYNOPSIS
@@ -53,12 +45,12 @@ version 1.999001
A fact to store output from configuration build and test. Not generally used
if LegacyReport is used.
-=for Pod::Coverage optional_keys
-
=head1 USAGE
See L<Metabase::Fact>.
+=for Pod::Coverage optional_keys
+
=head1 BUGS
Please report any bugs or feature using the CPAN Request Tracker.
@@ -70,20 +62,14 @@ existing test-file that illustrates the bug or desired feature.
=head1 AUTHOR
- David Golden <dagolden@cpan.org>
+David Golden <dagolden@cpan.org>
=head1 COPYRIGHT AND LICENSE
-This software is Copyright (c) 2010 by David Golden.
+This software is Copyright (c) 2014 by David Golden.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
=cut
-
-
-__END__
-
-
-
@@ -1,20 +1,10 @@
-#
-# This file is part of CPAN-Testers-Report
-#
-# This software is Copyright (c) 2010 by David Golden.
-#
-# This is free software, licensed under:
-#
-# The Apache License, Version 2.0, January 2004
-#
use 5.006;
use strict;
use warnings;
+
package CPAN::Testers::Fact::TestSummary;
-BEGIN {
- $CPAN::Testers::Fact::TestSummary::VERSION = '1.999001';
-}
# ABSTRACT: summary of a CPAN Testers analysis of a distribution
+our $VERSION = '1.999002'; # VERSION
use Carp ();
@@ -24,40 +14,42 @@ our @ISA = qw/Metabase::Fact::Hash/;
sub required_keys { qw/grade osname osversion archname perl_version/ }
sub content_metadata {
- my ($self) = @_;
- my $content = $self->content;
- return {
- grade => $content->{grade} ,
- osname => $content->{osname} ,
- archname => $content->{archname} ,
- perl_version => $content->{perl_version} ,
- }
+ my ($self) = @_;
+ my $content = $self->content;
+ return {
+ grade => $content->{grade},
+ osname => $content->{osname},
+ archname => $content->{archname},
+ perl_version => $content->{perl_version},
+ };
}
sub content_metadata_types {
- return {
- grade => '//str',
- osname => '//str',
- archname => '//str',
- perl_version => '//str',
- }
+ return {
+ grade => '//str',
+ osname => '//str',
+ archname => '//str',
+ perl_version => '//str',
+ };
}
-# should validate grades, etc. -- dagolden, 2009-03-30
+# should validate grades, etc. -- dagolden, 2009-03-30
1;
-
+__END__
=pod
+=encoding UTF-8
+
=head1 NAME
CPAN::Testers::Fact::TestSummary - summary of a CPAN Testers analysis of a distribution
=head1 VERSION
-version 1.999001
+version 1.999002
=head1 SYNOPSIS
@@ -81,8 +73,6 @@ Summarize CPAN testers run -- this is equivalent to the content of the old
email Subject line, plus explicit OS name and perl version, which previously had
to be parsed out of the report
-=for Pod::Coverage required_keys
-
=head1 USAGE
See L<Metabase::Fact>.
@@ -90,6 +80,8 @@ See L<Metabase::Fact>.
Todo:
# XXX document valid grades, etc. -- dagolden, 2009-03-30
+=for Pod::Coverage required_keys
+
=head1 BUGS
Please report any bugs or feature using the CPAN Request Tracker.
@@ -101,20 +93,14 @@ existing test-file that illustrates the bug or desired feature.
=head1 AUTHOR
- David Golden <dagolden@cpan.org>
+David Golden <dagolden@cpan.org>
=head1 COPYRIGHT AND LICENSE
-This software is Copyright (c) 2010 by David Golden.
+This software is Copyright (c) 2014 by David Golden.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
=cut
-
-
-__END__
-
-
-
@@ -1,20 +1,10 @@
-#
-# This file is part of CPAN-Testers-Report
-#
-# This software is Copyright (c) 2010 by David Golden.
-#
-# This is free software, licensed under:
-#
-# The Apache License, Version 2.0, January 2004
-#
use 5.006;
use strict;
use warnings;
+
package CPAN::Testers::Fact::TesterComment;
-BEGIN {
- $CPAN::Testers::Fact::TesterComment::VERSION = '1.999001';
-}
# ABSTRACT: comment about a CPAN Tester report
+our $VERSION = '1.999002'; # VERSION
use Carp ();
@@ -23,17 +13,19 @@ our @ISA = qw/Metabase::Fact::String/;
1;
-
+__END__
=pod
+=encoding UTF-8
+
=head1 NAME
CPAN::Testers::Fact::TesterComment - comment about a CPAN Tester report
=head1 VERSION
-version 1.999001
+version 1.999002
=head1 SYNOPSIS
@@ -60,20 +52,14 @@ existing test-file that illustrates the bug or desired feature.
=head1 AUTHOR
- David Golden <dagolden@cpan.org>
+David Golden <dagolden@cpan.org>
=head1 COPYRIGHT AND LICENSE
-This software is Copyright (c) 2010 by David Golden.
+This software is Copyright (c) 2014 by David Golden.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
=cut
-
-
-__END__
-
-
-
@@ -1,71 +1,59 @@
-#
-# This file is part of CPAN-Testers-Report
-#
-# This software is Copyright (c) 2010 by David Golden.
-#
-# This is free software, licensed under:
-#
-# The Apache License, Version 2.0, January 2004
-#
use 5.006;
use strict;
use warnings;
package CPAN::Testers::Report;
-BEGIN {
- $CPAN::Testers::Report::VERSION = '1.999001';
-}
# ABSTRACT: CPAN Testers report object
+our $VERSION = '1.999002'; # VERSION
use Metabase::Report 0.016 ();
our @ISA = qw/Metabase::Report/;
CPAN::Testers::Report->load_fact_classes;
-sub report_spec {
- return {
- 'CPAN::Testers::Fact::LegacyReport' => 1,
- 'CPAN::Testers::Fact::TestSummary' => 1, # include date
- 'CPAN::Testers::Fact::TestOutput' => '0+', # eventually by phase
- 'CPAN::Testers::Fact::TesterComment' => '0+',
- 'CPAN::Testers::Fact::PerlConfig' => '0+',
- 'CPAN::Testers::Fact::TestEnvironment' => '0+',
- 'CPAN::Testers::Fact::Prereqs' => '0+', # declared versions
- 'CPAN::Testers::Fact::InstalledModules' => '0+',
- # XXX needs NNTP_ID for old reports -- dagolden, 2009-06-24
- # future goals
- # 'CPAN::Testers::Fact::TAPArchive' => 1,
- }
+sub report_spec {
+ return {
+ 'CPAN::Testers::Fact::LegacyReport' => 1,
+ 'CPAN::Testers::Fact::TestSummary' => 1, # include date
+ 'CPAN::Testers::Fact::TestOutput' => '0+', # eventually by phase
+ 'CPAN::Testers::Fact::TesterComment' => '0+',
+ 'CPAN::Testers::Fact::PerlConfig' => '0+',
+ 'CPAN::Testers::Fact::TestEnvironment' => '0+',
+ 'CPAN::Testers::Fact::Prereqs' => '0+', # declared versions
+ 'CPAN::Testers::Fact::InstalledModules' => '0+',
+ # XXX needs NNTP_ID for old reports -- dagolden, 2009-06-24
+ # future goals
+ # 'CPAN::Testers::Fact::TAPArchive' => 1,
+ };
}
sub content_metadata {
- my ($self) = @_;
- for my $fact ( $self->facts ) {
- next unless $fact->type eq 'CPAN-Testers-Fact-LegacyReport';
- return $fact->content_metadata;
- }
+ my ($self) = @_;
+ for my $fact ( $self->facts ) {
+ next unless $fact->type eq 'CPAN-Testers-Fact-LegacyReport';
+ return $fact->content_metadata;
+ }
}
-
+
sub content_metadata_types {
- my ($self) = @_;
- for my $fact ( $self->facts ) {
- next unless $fact->type eq 'CPAN::Testers::Fact::LegacyReport';
- return $fact->content_metadata_types;
- }
+ require CPAN::Testers::Fact::LegacyReport;
+ return CPAN::Testers::Fact::LegacyReport->content_metadata_types;
}
-
-1;
+1;
+__END__
=pod
+=encoding UTF-8
+
=head1 NAME
CPAN::Testers::Report - CPAN Testers report object
=head1 VERSION
-version 1.999001
+version 1.999002
=head1 SYNOPSIS
@@ -96,7 +84,7 @@ Metabase report class encapsulating Facts about a CPAN Testers report
=head1 USAGE
-CPAN::Testers::Report subclases L<Metabase::Report>. See that module for API.
+CPAN::Testers::Report subclasses L<Metabase::Report>. See that module for API.
See L<Test::Reporter::Transport::Metabase> for an example of usage.
=head1 BUGS
@@ -108,23 +96,39 @@ L<http://rt.cpan.org/Dist/Display.html?Queue=CPAN-Testers-Report>
When submitting a bug or request, please include a test-file or a patch to an
existing test-file that illustrates the bug or desired feature.
-=head1 AUTHOR
+=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
- David Golden <dagolden@cpan.org>
+=head1 SUPPORT
-=head1 COPYRIGHT AND LICENSE
+=head2 Bugs / Feature Requests
-This software is Copyright (c) 2010 by David Golden.
+Please report any bugs or feature requests through the issue tracker
+at L<https://github.com/dagolden/CPAN-Testers-Report/issues>.
+You will be notified automatically of any progress on your issue.
-This is free software, licensed under:
+=head2 Source Code
- The Apache License, Version 2.0, January 2004
+This is open source software. The code repository is available for
+public review and contribution under the terms of the license.
-=cut
+L<https://github.com/dagolden/CPAN-Testers-Report>
+ git clone https://github.com/dagolden/CPAN-Testers-Report.git
-__END__
+=head1 AUTHOR
+
+David Golden <dagolden@cpan.org>
+
+=head1 CONTRIBUTOR
+
+David Steinbrunner <dsteinbrunner@pobox.com>
+=head1 COPYRIGHT AND LICENSE
+This software is Copyright (c) 2014 by David Golden.
+This is free software, licensed under:
+ The Apache License, Version 2.0, January 2004
+
+=cut
@@ -0,0 +1,26 @@
+severity = 5
+verbose = 8
+
+[Variables::ProhibitPunctuationVars]
+allow = $@ $!
+
+[TestingAndDebugging::ProhibitNoStrict]
+allow = refs
+
+[Variables::ProhibitEvilVariables]
+variables = $DB::single
+
+# Turn these off
+[-BuiltinFunctions::ProhibitStringyEval]
+[-ControlStructures::ProhibitPostfixControls]
+[-ControlStructures::ProhibitUnlessBlocks]
+[-Documentation::RequirePodSections]
+[-InputOutput::ProhibitInteractiveTest]
+[-References::ProhibitDoubleSigils]
+[-RegularExpressions::RequireExtendedFormatting]
+[-InputOutput::ProhibitTwoArgOpen]
+[-Modules::ProhibitEvilModules]
+
+# Turn this on
+[Lax::ProhibitStringyEval::ExceptForRequire]
+
@@ -1,53 +0,0 @@
-#!perl
-#
-# This file is part of CPAN-Testers-Report
-#
-# This software is Copyright (c) 2010 by David Golden.
-#
-# This is free software, licensed under:
-#
-# The Apache License, Version 2.0, January 2004
-#
-
-use strict;
-use warnings;
-
-use Test::More;
-use File::Find;
-use File::Temp qw{ tempdir };
-
-my @modules;
-find(
- sub {
- return if $File::Find::name !~ /\.pm\z/;
- my $found = $File::Find::name;
- $found =~ s{^lib/}{};
- $found =~ s{[/\\]}{::}g;
- $found =~ s/\.pm$//;
- # nothing to skip
- push @modules, $found;
- },
- 'lib',
-);
-
-my @scripts = glob "bin/*";
-
-plan tests => scalar(@modules) + scalar(@scripts);
-
-{
- # fake home for cpan-testers
- local $ENV{HOME} = tempdir( CLEANUP => 1 );
-
- is( qx{ $^X -Ilib -M$_ -e "print '$_ ok'" }, "$_ ok", "$_ loaded ok" )
- for sort @modules;
-
- SKIP: {
- eval "use Test::Script; 1;";
- skip "Test::Script needed to test script compilation", scalar(@scripts) if $@;
- foreach my $file ( @scripts ) {
- my $script = $file;
- $script =~ s!.*/!!;
- script_compiles_ok( $file, "$script script compiles" );
- }
- }
-}
@@ -0,0 +1,183 @@
+#!perl
+
+use strict;
+use warnings;
+
+# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.013
+
+use Test::More tests => 1;
+
+use ExtUtils::MakeMaker;
+use File::Spec::Functions;
+use List::Util qw/max/;
+use version;
+
+# hide optional CPAN::Meta modules from prereq scanner
+# and check if they are available
+my $cpan_meta = "CPAN::Meta";
+my $cpan_meta_req = "CPAN::Meta::Requirements";
+my $HAS_CPAN_META = eval "require $cpan_meta"; ## no critic
+my $HAS_CPAN_META_REQ = eval "require $cpan_meta_req; $cpan_meta_req->VERSION('2.120900')";
+
+# Verify requirements?
+my $DO_VERIFY_PREREQS = 1;
+
+sub _merge_requires {
+ my ($collector, $prereqs) = @_;
+ for my $phase ( qw/configure build test runtime develop/ ) {
+ next unless exists $prereqs->{$phase};
+ if ( my $req = $prereqs->{$phase}{'requires'} ) {
+ my $cmr = CPAN::Meta::Requirements->from_string_hash( $req );
+ $collector->add_requirements( $cmr );
+ }
+ }
+}
+
+my %include = map {; $_ => 1 } qw(
+
+);
+
+my %exclude = map {; $_ => 1 } qw(
+
+);
+
+# Add static prereqs to the included modules list
+my $static_prereqs = do { my $x = {
+ 'configure' => {
+ 'requires' => {
+ 'ExtUtils::MakeMaker' => '6.17'
+ }
+ },
+ 'develop' => {
+ 'requires' => {
+ 'Dist::Zilla' => '5',
+ 'Dist::Zilla::PluginBundle::DAGOLDEN' => '0.060',
+ 'File::Spec' => '0',
+ 'File::Temp' => '0',
+ 'IO::Handle' => '0',
+ 'IPC::Open3' => '0',
+ 'Pod::Coverage::TrustPod' => '0',
+ 'Test::CPAN::Meta' => '0',
+ 'Test::More' => '0',
+ 'Test::Pod' => '1.41',
+ 'Test::Pod::Coverage' => '1.08',
+ 'Test::Spelling' => '0.12'
+ }
+ },
+ 'runtime' => {
+ 'requires' => {
+ 'Carp' => '0',
+ 'Metabase::Fact::Hash' => '0.016',
+ 'Metabase::Fact::String' => '0.016',
+ 'Metabase::Report' => '0.016',
+ 'perl' => '5.006',
+ 'strict' => '0',
+ 'warnings' => '0'
+ }
+ },
+ 'test' => {
+ 'recommends' => {
+ 'CPAN::Meta' => '0',
+ 'CPAN::Meta::Requirements' => '2.120900'
+ },
+ 'requires' => {
+ 'ExtUtils::MakeMaker' => '0',
+ 'File::Spec::Functions' => '0',
+ 'List::Util' => '0',
+ 'Test::More' => '0.88',
+ 'version' => '0'
+ }
+ }
+ };
+ $x;
+ };
+
+delete $static_prereqs->{develop} if not $ENV{AUTHOR_TESTING};
+$include{$_} = 1 for map { keys %$_ } map { values %$_ } values %$static_prereqs;
+
+# Merge requirements for major phases (if we can)
+my $all_requires;
+if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META_REQ ) {
+ $all_requires = $cpan_meta_req->new;
+ _merge_requires($all_requires, $static_prereqs);
+}
+
+
+# Add dynamic prereqs to the included modules list (if we can)
+my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml';
+if ( $source && $HAS_CPAN_META ) {
+ if ( my $meta = eval { CPAN::Meta->load_file($source) } ) {
+ my $dynamic_prereqs = $meta->prereqs;
+ delete $dynamic_prereqs->{develop} if not $ENV{AUTHOR_TESTING};
+ $include{$_} = 1 for map { keys %$_ } map { values %$_ } values %$dynamic_prereqs;
+
+ if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META_REQ ) {
+ _merge_requires($all_requires, $dynamic_prereqs);
+ }
+ }
+}
+else {
+ $source = 'static metadata';
+}
+
+my @modules = sort grep { ! $exclude{$_} } keys %include;
+my @reports = [qw/Version Module/];
+my @dep_errors;
+my $req_hash = defined($all_requires) ? $all_requires->as_string_hash : {};
+
+for my $mod ( @modules ) {
+ next if $mod eq 'perl';
+ my $file = $mod;
+ $file =~ s{::}{/}g;
+ $file .= ".pm";
+ my ($prefix) = grep { -e catfile($_, $file) } @INC;
+ if ( $prefix ) {
+ my $ver = MM->parse_version( catfile($prefix, $file) );
+ $ver = "undef" unless defined $ver; # Newer MM should do this anyway
+ push @reports, [$ver, $mod];
+
+ if ( $DO_VERIFY_PREREQS && $all_requires ) {
+ my $req = $req_hash->{$mod};
+ if ( defined $req && length $req ) {
+ if ( ! defined eval { version->parse($ver) } ) {
+ push @dep_errors, "$mod version '$ver' cannot be parsed (version '$req' required)";
+ }
+ elsif ( ! $all_requires->accepts_module( $mod => $ver ) ) {
+ push @dep_errors, "$mod version '$ver' is not in required range '$req'";
+ }
+ }
+ }
+
+ }
+ else {
+ push @reports, ["missing", $mod];
+
+ if ( $DO_VERIFY_PREREQS && $all_requires ) {
+ my $req = $req_hash->{$mod};
+ if ( defined $req && length $req ) {
+ push @dep_errors, "$mod is not installed (version '$req' required)";
+ }
+ }
+ }
+}
+
+if ( @reports ) {
+ my $vl = max map { length $_->[0] } @reports;
+ my $ml = max map { length $_->[1] } @reports;
+ splice @reports, 1, 0, ["-" x $vl, "-" x $ml];
+ diag "\nVersions for all modules listed in $source (including optional ones):\n",
+ map {sprintf(" %*s %*s\n",$vl,$_->[0],-$ml,$_->[1])} @reports;
+}
+
+if ( @dep_errors ) {
+ diag join("\n",
+ "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n",
+ "The following REQUIRED prerequisites were not satisfied:\n",
+ @dep_errors,
+ "\n"
+ );
+}
+
+pass;
+
+# vim: ts=4 sts=4 sw=4 et:
@@ -20,5 +20,5 @@ my @classes = qw (
plan tests => scalar @classes;
-require_ok( $_ ) for @classes;
+require_ok($_) for @classes;
@@ -0,0 +1,5 @@
+; Install Code::TidyAll
+; run "tidyall -a" to tidy all files
+; run "tidyall -g" to tidy only files modified from git
+[PerlTidy]
+select = {lib,t}/**/*.{pl,pm,t}
@@ -0,0 +1,61 @@
+use 5.006;
+use strict;
+use warnings;
+
+# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.043
+
+use Test::More tests => 9 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
+
+
+
+my @module_files = (
+ 'CPAN/Testers/Fact/InstalledModules.pm',
+ 'CPAN/Testers/Fact/LegacyReport.pm',
+ 'CPAN/Testers/Fact/PerlConfig.pm',
+ 'CPAN/Testers/Fact/Prereqs.pm',
+ 'CPAN/Testers/Fact/TestEnvironment.pm',
+ 'CPAN/Testers/Fact/TestOutput.pm',
+ 'CPAN/Testers/Fact/TestSummary.pm',
+ 'CPAN/Testers/Fact/TesterComment.pm',
+ 'CPAN/Testers/Report.pm'
+);
+
+
+
+# fake home for cpan-testers
+use File::Temp;
+local $ENV{HOME} = File::Temp::tempdir( CLEANUP => 1 );
+
+
+my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib';
+
+use File::Spec;
+use IPC::Open3;
+use IO::Handle;
+
+open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";
+
+my @warnings;
+for my $lib (@module_files)
+{
+ # see L<perlfaq8/How can I capture STDERR from an external command?>
+ my $stderr = IO::Handle->new;
+
+ my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]");
+ binmode $stderr, ':crlf' if $^O eq 'MSWin32';
+ my @_warnings = <$stderr>;
+ waitpid($pid, 0);
+ is($?, 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,12 @@
+#!perl
+
+use strict;
+use warnings;
+
+use Test::More;
+use English qw(-no_match_vars);
+
+eval "use Test::Perl::Critic";
+plan skip_all => 'Test::Perl::Critic required to criticise code' if $@;
+Test::Perl::Critic->import( -profile => "perlcritic.rc" ) if -e "perlcritic.rc";
+all_critic_ok();
@@ -0,0 +1,33 @@
+use strict;
+use warnings;
+use Test::More;
+
+# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006008
+use Test::Spelling 0.12;
+use Pod::Wordlist;
+
+
+add_stopwords(<DATA>);
+all_pod_files_spelling_ok( qw( bin lib ) );
+__DATA__
+metabase
+todo
+submodules
+David
+Golden
+dagolden
+Steinbrunner
+dsteinbrunner
+lib
+CPAN
+Testers
+Fact
+Prereqs
+Report
+TestEnvironment
+LegacyReport
+InstalledModules
+TestSummary
+PerlConfig
+TesterComment
+TestOutput
@@ -1,16 +1,6 @@
#!perl
-#
-# This file is part of CPAN-Testers-Report
-#
-# This software is Copyright (c) 2010 by David Golden.
-#
-# This is free software, licensed under:
-#
-# The Apache License, Version 2.0, January 2004
-#
+# This file was automatically generated by Dist::Zilla::Plugin::MetaTests.
-use Test::More;
+use Test::CPAN::Meta;
-eval "use Test::CPAN::Meta";
-plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@;
meta_yaml_ok();
@@ -0,0 +1,8 @@
+#!perl
+
+use Test::More;
+
+eval "use Test::MinimumVersion";
+plan skip_all => "Test::MinimumVersion required for testing minimum versions"
+ if $@;
+all_minimum_version_ok( qq{5.010} );
@@ -1,22 +1,7 @@
#!perl
-#
-# This file is part of CPAN-Testers-Report
-#
-# This software is Copyright (c) 2010 by David Golden.
-#
-# This is free software, licensed under:
-#
-# The Apache License, Version 2.0, January 2004
-#
+# This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests.
-use Test::More;
-
-eval "use Test::Pod::Coverage 1.08";
-plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage"
- if $@;
-
-eval "use Pod::Coverage::TrustPod";
-plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage"
- if $@;
+use Test::Pod::Coverage 1.08;
+use Pod::Coverage::TrustPod;
all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' });
@@ -1,16 +1,6 @@
#!perl
-#
-# This file is part of CPAN-Testers-Report
-#
-# This software is Copyright (c) 2010 by David Golden.
-#
-# This is free software, licensed under:
-#
-# The Apache License, Version 2.0, January 2004
-#
+# 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();
@@ -1,17 +1,12 @@
#!perl
-#
-# This file is part of CPAN-Testers-Report
-#
-# This software is Copyright (c) 2010 by David Golden.
-#
-# This is free software, licensed under:
-#
-# The Apache License, Version 2.0, January 2004
-#
+
+use strict;
+use warnings;
use Test::More;
-eval "use Test::Portability::Files";
-plan skip_all => "Test::Portability::Files required for testing portability"
- if $@;
+eval 'use Test::Portability::Files';
+plan skip_all => 'Test::Portability::Files required for testing portability'
+ if $@;
+options(test_one_dot => 0);
run_tests();
@@ -0,0 +1,22 @@
+use strict;
+use warnings;
+use Test::More;
+
+# generated by Dist::Zilla::Plugin::Test::Version 0.002004
+BEGIN { eval "use Test::Version; 1;" or die $@; }
+
+my @imports = ( 'version_all_ok' );
+
+my $params = {
+ is_strict => 0,
+ has_version => 1,
+};
+
+push @imports, $params
+ if version->parse( $Test::Version::VERSION ) >= version->parse('1.002');
+
+
+Test::Version->import(@imports);
+
+version_all_ok;
+done_testing;