@@ -1,18 +1,5 @@
Revision history for Test-Version
-1.004001 2014-10-20
- - improved consistent check diagnostics GH #11 (SZABGAB)
-
-1.004000 2014-10-18
- - add consistent check GH #10 (SZABGAB)
-
-1.003001 2014-09-06
- - remove inline and remove _get_version, trying to skip test there won't
- work GH #4 (ETHER)
-
-1.003000 2014-09-05
- - skip packages unindexable by pause GH #4 (ETHER)
-
1.002004 2013-11-21
- fix bugs in argument handling
- fix whitespace
@@ -1,4 +1,4 @@
-This software is Copyright (c) 2014 by Caleb Cushing.
+This software is Copyright (c) 2013 by Caleb Cushing.
This is free software, licensed under:
@@ -1,4 +1,3 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.020.
CONTRIBUTING
Changes
LICENSE
@@ -7,43 +6,36 @@ META.json
META.yml
Makefile.PL
README
-corpus/consistent/Bar.pm
-corpus/consistent/Foo.pm
corpus/fail/FooBarBaz.pm
-corpus/inconsistent/Bar.pm
-corpus/inconsistent/Foo.pm
-corpus/missing/Bar.pm
-corpus/missing/Baz.pm
-corpus/missing/Foo.pm
corpus/not_strict/NotStrict.pm
corpus/noversion/FooBar.pm
corpus/pass/Foo.pm
lib/Test/Version.pm
perlcritic.rc
t/00-compile.t
-t/00-report-prereqs.dd
-t/00-report-prereqs.t
+t/000-report-versions-tiny.t
t/all-has-version-false.t
t/all.t
t/at-least-one-version.t
-t/consistent.t
+t/author-critic.t
+t/author-pod-spell.t
+t/author-test-eol.t
t/fail.t
t/file-not-defined.t
-t/inconsistent.t
-t/missing-has-version.t
-t/missing.t
t/no-file.t
t/noversion.t
t/pass.t
+t/release-cpan-changes.t
+t/release-dist-manifest.t
+t/release-distmeta.t
+t/release-meta-json.t
+t/release-minimum-version.t
+t/release-mojibake.t
+t/release-pod-coverage.t
+t/release-pod-linkcheck.t
+t/release-pod-syntax.t
+t/release-portability.t
+t/release-synopsis.t
+t/release-test-version.t
+t/release-unused-vars.t
t/strict.t
-xt/author/critic.t
-xt/author/test-eol.t
-xt/release/cpan-changes.t
-xt/release/dist-manifest.t
-xt/release/meta-json.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
-xt/release/unused-vars.t
@@ -4,7 +4,7 @@
"Caleb Cushing <xenoterracide@gmail.com>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 5.020, CPAN::Meta::Converter version 2.142690",
+ "generated_by" : "Dist::Zilla version 5.006, CPAN::Meta::Converter version 2.132830",
"license" : [
"artistic_2"
],
@@ -14,6 +14,9 @@
},
"name" : "Test-Version",
"no_index" : {
+ "directory" : [
+ "corpus"
+ ],
"file" : [
"perlcritic.rc"
]
@@ -21,15 +24,17 @@
"prereqs" : {
"configure" : {
"requires" : {
- "ExtUtils::MakeMaker" : "0"
+ "ExtUtils::MakeMaker" : "6.30"
}
},
"develop" : {
"requires" : {
"Pod::Coverage::TrustPod" : "0",
"Test::CPAN::Changes" : "0.19",
+ "Test::CPAN::Meta" : "0",
"Test::Pod" : "1.41",
- "Test::Pod::Coverage" : "1.08"
+ "Test::Pod::Coverage" : "1.08",
+ "version" : "0.9901"
}
},
"runtime" : {
@@ -39,7 +44,7 @@
"File::Find::Rule::Perl" : "0",
"Module::Metadata" : "0",
"Test::Builder" : "0",
- "Test::More" : "0",
+ "Test::More" : "0.88",
"parent" : "0",
"perl" : "5.006",
"strict" : "0",
@@ -48,16 +53,12 @@
}
},
"test" : {
- "recommends" : {
- "CPAN::Meta" : "2.120900"
- },
"requires" : {
- "ExtUtils::MakeMaker" : "0",
"File::Spec" : "0",
"IO::Handle" : "0",
"IPC::Open3" : "0",
"Test::Exception" : "0",
- "Test::More" : "0",
+ "Test::More" : "0.88",
"Test::Tester" : "0"
}
}
@@ -65,7 +66,7 @@
"provides" : {
"Test::Version" : {
"file" : "lib/Test/Version.pm",
- "version" : "1.004001"
+ "version" : "1.002004"
}
},
"release_status" : "stable",
@@ -80,9 +81,8 @@
"web" : "https://github.com/xenoterracide/test-version"
}
},
- "version" : "1.004001",
+ "version" : "1.002004",
"x_contributors" : [
- "Gabor Szabo <gabor@szabgab.com>",
"Graham Ollis <perl@wdlabs.com>",
"Michael G. Schwern <schwern@pobox.com>",
"Mike Doherty <doherty@cs.dal.ca>",
@@ -3,48 +3,48 @@ abstract: "Check to see that version's in modules are sane"
author:
- 'Caleb Cushing <xenoterracide@gmail.com>'
build_requires:
- ExtUtils::MakeMaker: '0'
- File::Spec: '0'
- IO::Handle: '0'
- IPC::Open3: '0'
- Test::Exception: '0'
- Test::More: '0'
- Test::Tester: '0'
+ File::Spec: 0
+ IO::Handle: 0
+ IPC::Open3: 0
+ Test::Exception: 0
+ Test::More: 0.88
+ Test::Tester: 0
configure_requires:
- ExtUtils::MakeMaker: '0'
+ ExtUtils::MakeMaker: 6.30
dynamic_config: 0
-generated_by: 'Dist::Zilla version 5.020, CPAN::Meta::Converter version 2.142690'
+generated_by: 'Dist::Zilla version 5.006, CPAN::Meta::Converter version 2.132830'
license: artistic_2
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: '1.4'
+ version: 1.4
name: Test-Version
no_index:
+ directory:
+ - corpus
file:
- perlcritic.rc
provides:
Test::Version:
file: lib/Test/Version.pm
- version: '1.004001'
+ version: 1.002004
requires:
- Carp: '0'
- Exporter: '0'
- File::Find::Rule::Perl: '0'
- Module::Metadata: '0'
- Test::Builder: '0'
- Test::More: '0'
- parent: '0'
- perl: '5.006'
- strict: '0'
- version: '0.86'
- warnings: '0'
+ Carp: 0
+ Exporter: 0
+ File::Find::Rule::Perl: 0
+ Module::Metadata: 0
+ Test::Builder: 0
+ Test::More: 0.88
+ parent: 0
+ perl: 5.006
+ strict: 0
+ version: 0.86
+ warnings: 0
resources:
bugtracker: https://github.com/xenoterracide/test-version/issues
homepage: https://metacpan.org/dist/Test-Version
repository: git://github.com/xenoterracide/test-version.git
-version: '1.004001'
+version: 1.002004
x_contributors:
- - 'Gabor Szabo <gabor@szabgab.com>'
- 'Graham Ollis <perl@wdlabs.com>'
- 'Michael G. Schwern <schwern@pobox.com>'
- 'Mike Doherty <doherty@cs.dal.ca>'
@@ -1,19 +1,19 @@
-# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.020.
use strict;
use warnings;
use 5.006;
-use ExtUtils::MakeMaker ;
+use ExtUtils::MakeMaker 6.30;
my %WriteMakefileArgs = (
"ABSTRACT" => "Check to see that version's in modules are sane",
"AUTHOR" => "Caleb Cushing <xenoterracide\@gmail.com>",
+ "BUILD_REQUIRES" => {},
"CONFIGURE_REQUIRES" => {
- "ExtUtils::MakeMaker" => 0
+ "ExtUtils::MakeMaker" => "6.30"
},
"DISTNAME" => "Test-Version",
"EXE_FILES" => [],
@@ -25,22 +25,21 @@ my %WriteMakefileArgs = (
"File::Find::Rule::Perl" => 0,
"Module::Metadata" => 0,
"Test::Builder" => 0,
- "Test::More" => 0,
+ "Test::More" => "0.88",
"parent" => 0,
"strict" => 0,
"version" => "0.86",
"warnings" => 0
},
"TEST_REQUIRES" => {
- "ExtUtils::MakeMaker" => 0,
"File::Spec" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
"Test::Exception" => 0,
- "Test::More" => 0,
+ "Test::More" => "0.88",
"Test::Tester" => 0
},
- "VERSION" => "1.004001",
+ "VERSION" => "1.002004",
"test" => {
"TESTS" => "t/*.t"
}
@@ -50,7 +49,6 @@ my %WriteMakefileArgs = (
my %FallbackPrereqs = (
"Carp" => 0,
"Exporter" => 0,
- "ExtUtils::MakeMaker" => 0,
"File::Find::Rule::Perl" => 0,
"File::Spec" => 0,
"IO::Handle" => 0,
@@ -58,7 +56,7 @@ my %FallbackPrereqs = (
"Module::Metadata" => 0,
"Test::Builder" => 0,
"Test::Exception" => 0,
- "Test::More" => 0,
+ "Test::More" => "0.88",
"Test::Tester" => 0,
"parent" => 0,
"strict" => 0,
@@ -2,14 +2,13 @@ NAME
Test::Version - Check to see that version's in modules are sane
VERSION
- version 1.004001
+ version 1.002004
SYNOPSIS
use Test::More;
use Test::Version 1.001001 qw( version_all_ok ), {
is_strict => 0,
has_version => 1,
- consistent => 1,
};
# test blib or lib by default
@@ -79,17 +78,6 @@ CONFIGURATION AND ENVIRONMENT
this allows enabling of versions "is_strict" checks to ensure that your
version is strict.
- consistent
- use Test::Version { consistent => 1 };
-
- Check if every module has the same version number.
-
- ignore_unindexable
- use Test::Version { ignore_unindexable => 0};
-
- if you have at least Module::Metadata v1.000020 Test::Version will by
- default skip any files not considered is_indexable
-
SEE ALSO
The goal is to have the functionality of all of these.
@@ -105,8 +93,6 @@ BUGS
to an existing test-file that illustrates the bug or desired feature.
CONTRIBUTORS
- * Gabor Szabo <gabor@szabgab.com>
-
* Graham Ollis <perl@wdlabs.com>
* Michael G. Schwern <schwern@pobox.com>
@@ -119,7 +105,7 @@ AUTHOR
Caleb Cushing <xenoterracide@gmail.com>
COPYRIGHT AND LICENSE
- This software is Copyright (c) 2014 by Caleb Cushing.
+ This software is Copyright (c) 2013 by Caleb Cushing.
This is free software, licensed under:
@@ -1,5 +0,0 @@
-package Bar;
-BEGIN {
- our $VERSION = '1.23';
-}
-1;
@@ -1,5 +0,0 @@
-package Foo;
-BEGIN {
- our $VERSION = '1.23';
-}
-1;
@@ -1,5 +0,0 @@
-package Bar;
-BEGIN {
- our $VERSION = '1.23';
-}
-1;
@@ -1,5 +0,0 @@
-package Foo;
-BEGIN {
- our $VERSION = '1.24';
-}
-1;
@@ -1,5 +0,0 @@
-package Bar;
-BEGIN {
- our $VERSION = '1.23';
-}
-1;
@@ -1,2 +0,0 @@
-package Baz;
-1;
@@ -1,5 +0,0 @@
-package Foo;
-BEGIN {
- our $VERSION = '1.23';
-}
-1;
@@ -4,7 +4,7 @@ use strict;
use warnings;
use Carp;
-our $VERSION = '1.004001'; # VERSION
+our $VERSION = '1.002004'; # VERSION
use parent 'Exporter';
use Test::Builder;
@@ -38,24 +38,18 @@ sub import { ## no critic qw( Subroutines::RequireArgUnpacking Subroutines::Requ
: 1
;
- $cfg->{consistent}
- = defined $cfg->{consistent} ? $cfg->{consistent}
- : 0
- ;
-
- my $mmv = version->parse( $Module::Metadata::VERSION );
- my $rec = version->parse( '1.000020' );
- if ( $mmv >= $rec && ! defined $cfg->{ignore_unindexable} ) {
- $cfg->{ignore_unindexable} = 1;
- }
-
__PACKAGE__->export_to_level( 1, @exports );
}
my $version_counter = 0;
-my $version_number;
-my $consistent = 1;
-my %versions;
+
+
+sub _get_version {
+ my $pm = shift;
+
+ my $info = Module::Metadata->new_from_file( $pm );
+ return $info->version;
+}
my $test = Test::Builder->new;
@@ -68,18 +62,7 @@ sub version_ok {
croak "'$file' doesn't exist." unless -e $file;
- my $info = Module::Metadata->new_from_file( $file );
- if ( $cfg->{ignore_unindexable} ) {
- $test->skip( "$file not indexable" );
- return 0 if ! $info->is_indexable;
- }
- my $version = $info->version;
-
- $versions{$file} = $version;
-
- if (not defined $version) {
- $consistent = 0;
- }
+ my $version = _get_version( $file );
if ( not $version and not $cfg->{has_version} ) {
$test->skip( 'No version was found in "'
@@ -99,13 +82,6 @@ sub version_ok {
return 0;
}
- unless (defined $version_number) {
- $version_number = $version;
- }
- if ($version ne $version_number) {
- $consistent = 0;
- }
-
unless ( is_lax( $version ) ) {
$test->ok( 0, $name );
$test->diag( "The version '$version' found in '$file' is invalid." );
@@ -146,15 +122,6 @@ sub version_all_ok {
version_ok( $file );
}
- if ($cfg->{consistent} and not $consistent) {
- $test->ok( 0, $name );
- $test->diag('The version numbers in this distribution are not the same');
- foreach my $file (sort { $versions{$a} cmp $versions{$b} } keys %versions) {
- $test->diag(sprintf "%10s %s", (defined $versions{$file} ? $versions{$file} : 'undef'), $file);
- }
- return;
- }
-
# has at least 1 version in the dist
if ( not $cfg->{has_version} and $version_counter < 1 ) {
$test->ok( 0, $name );
@@ -185,7 +152,7 @@ Test::Version - Check to see that version's in modules are sane
=head1 VERSION
-version 1.004001
+version 1.002004
=head1 SYNOPSIS
@@ -193,7 +160,6 @@ version 1.004001
use Test::Version 1.001001 qw( version_all_ok ), {
is_strict => 0,
has_version => 1,
- consistent => 1,
};
# test blib or lib by default
@@ -276,19 +242,6 @@ really doesn't make sense to use with just L<version_ok|/version_ok>
this allows enabling of L<version>s C<is_strict> checks to ensure that your
version is strict.
-=head2 consistent
-
- use Test::Version { consistent => 1 };
-
-Check if every module has the same version number.
-
-=head2 ignore_unindexable
-
- use Test::Version { ignore_unindexable => 0};
-
-if you have at least L<Module::Metadata> vC<1.000020> Test::Version will by
-default skip any files not considered L<is_indexable|Module::Metadata/is_indexable>
-
=head1 SEE ALSO
The goal is to have the functionality of all of these.
@@ -314,16 +267,10 @@ feature.
=head1 CONTRIBUTORS
-=for stopwords Gabor Szabo Graham Ollis Michael G. Schwern Mike Doherty particle
-
=over 4
=item *
-Gabor Szabo <gabor@szabgab.com>
-
-=item *
-
Graham Ollis <perl@wdlabs.com>
=item *
@@ -346,7 +293,7 @@ Caleb Cushing <xenoterracide@gmail.com>
=head1 COPYRIGHT AND LICENSE
-This software is Copyright (c) 2014 by Caleb Cushing.
+This software is Copyright (c) 2013 by Caleb Cushing.
This is free software, licensed under:
@@ -1,12 +1,11 @@
-use 5.006;
use strict;
use warnings;
-# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.051
+# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.037
+
+use Test::More tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
-use Test::More;
-plan tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
my @module_files = (
'Test/Version.pm'
@@ -22,12 +21,11 @@ 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?>
+ open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";
my $stderr = IO::Handle->new;
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]");
@@ -45,7 +43,6 @@ for my $lib (@module_files)
-is(scalar(@warnings), 0, 'no warnings found')
- or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if $ENV{AUTHOR_TESTING};
+is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING};
@@ -1,46 +0,0 @@
-do { my $x = {
- 'configure' => {
- 'requires' => {
- 'ExtUtils::MakeMaker' => '0'
- }
- },
- 'develop' => {
- 'requires' => {
- 'Pod::Coverage::TrustPod' => '0',
- 'Test::CPAN::Changes' => '0.19',
- 'Test::Pod' => '1.41',
- 'Test::Pod::Coverage' => '1.08'
- }
- },
- 'runtime' => {
- 'requires' => {
- 'Carp' => '0',
- 'Exporter' => '0',
- 'File::Find::Rule::Perl' => '0',
- 'Module::Metadata' => '0',
- 'Test::Builder' => '0',
- 'Test::More' => '0',
- 'parent' => '0',
- 'perl' => '5.006',
- 'strict' => '0',
- 'version' => '0.86',
- 'warnings' => '0'
- }
- },
- 'test' => {
- 'recommends' => {
- 'CPAN::Meta' => '2.120900'
- },
- 'requires' => {
- 'ExtUtils::MakeMaker' => '0',
- 'File::Spec' => '0',
- 'IO::Handle' => '0',
- 'IPC::Open3' => '0',
- 'Test::Exception' => '0',
- 'Test::More' => '0',
- 'Test::Tester' => '0'
- }
- }
- };
- $x;
- }
\ No newline at end of file
@@ -1,176 +0,0 @@
-#!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:
@@ -0,0 +1,85 @@
+use strict;
+use warnings;
+use Test::More 0.88;
+# This is a relatively nice way to avoid Test::NoWarnings breaking our
+# expectations by adding extra tests, without using no_plan. It also helps
+# avoid any other test module that feels introducing random tests, or even
+# test plans, is a nice idea.
+our $success = 0;
+END { $success && done_testing; }
+
+# List our own version used to generate this
+my $v = "\nGenerated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.10\n";
+
+eval { # no excuses!
+ # report our Perl details
+ my $want = '5.006';
+ $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','any version') };
+eval { $v .= pmver('ExtUtils::MakeMaker','6.30') };
+eval { $v .= pmver('File::Find::Rule::Perl','any version') };
+eval { $v .= pmver('File::Spec','any version') };
+eval { $v .= pmver('IO::Handle','any version') };
+eval { $v .= pmver('IPC::Open3','any version') };
+eval { $v .= pmver('Module::Metadata','any version') };
+eval { $v .= pmver('Test::Builder','any version') };
+eval { $v .= pmver('Test::Exception','any version') };
+eval { $v .= pmver('Test::More','0.88') };
+eval { $v .= pmver('Test::Tester','any version') };
+eval { $v .= pmver('parent','any version') };
+eval { $v .= pmver('strict','any version') };
+eval { $v .= pmver('version','0.86') };
+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;
@@ -4,10 +4,7 @@ use strict;
use warnings;
use Test::Tester;
use Test::More;
-use Test::Version version_all_ok => {
- has_version => 0,
- ignore_unindexable => 0,
-};
+use Test::Version qw( version_all_ok ), { has_version => 0 };
my ( $premature, @results ) = run_tests(
sub {
@@ -15,7 +12,7 @@ my ( $premature, @results ) = run_tests(
}
);
-is( scalar(@results), 12, 'correct number of results' );
+is( scalar(@results), 5, 'correct number of results' );
my @oks;
@@ -25,7 +22,7 @@ foreach my $result ( @results ) {
my $sorted = [ sort @oks ];
-my $expected = [ ( 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ) ];
+my $expected = [ ( 0, 1, 1, 1, 1 ) ];
note( 'unsorted oks: ', @oks );
@@ -3,7 +3,7 @@ use 5.006;
use strict;
use warnings;
use Test::Tester;
-use Test::Version version_all_ok => { ignore_unindexable => 0 };
+use Test::Version qw( version_all_ok );
use Test::More;
my ( $premature, @results ) = run_tests(
@@ -12,7 +12,7 @@ my ( $premature, @results ) = run_tests(
}
);
-is( scalar(@results), 12, 'correct number of results' );
+is( scalar(@results), 5, 'correct number of results' );
my @oks;
@@ -22,7 +22,7 @@ foreach my $result ( @results ) {
my $sorted = [ sort @oks ];
-my $expected = [ ( 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1 ) ];
+my $expected = [ ( 0, 0, 1, 1, 1 ) ];
note( 'unsorted oks: ', @oks );
@@ -4,10 +4,7 @@ use strict;
use warnings;
use Test::Tester;
use Test::More;
-use Test::Version version_all_ok => {
- has_version => 0,
- ignore_unindexable => 0,
-};
+use Test::Version qw( version_all_ok ), { has_version => 0 };
my ( $premature, @results ) = run_tests(
sub {
@@ -0,0 +1,20 @@
+#!perl
+
+BEGIN {
+ unless ($ENV{AUTHOR_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for testing by the author');
+ }
+}
+
+
+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,36 @@
+
+BEGIN {
+ unless ($ENV{AUTHOR_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for testing by the author');
+ }
+}
+
+use strict;
+use warnings;
+use Test::More;
+
+# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006001
+use Test::Spelling 0.12;
+use Pod::Wordlist;
+
+
+add_stopwords(<DATA>);
+all_pod_files_spelling_ok( qw( bin lib ) );
+__DATA__
+Caleb
+Cushing
+xenoterracide
+Graham
+Ollis
+perl
+Michael
+Schwern
+schwern
+Mike
+Doherty
+doherty
+particle
+lib
+Test
+Version
@@ -0,0 +1,16 @@
+
+BEGIN {
+ unless ($ENV{AUTHOR_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for testing by the author');
+ }
+}
+
+use strict;
+use warnings;
+use Test::More;
+
+# generated by Dist::Zilla::Plugin::Test::EOL 0.08
+use Test::EOL;
+
+all_perl_files_ok({ trailing_whitespace => 1 });
@@ -1,28 +0,0 @@
-#!/usr/bin/perl
-use 5.006;
-use strict;
-use warnings;
-use Test::Tester;
-use Test::More;
-use Test::Version version_all_ok => {
- has_version => 0,
- ignore_unindexable => 0,
- consistent => 1,
-};
-
-my ( $premature, @results ) = run_tests(
- sub {
- version_all_ok('corpus/consistent');
- }
-);
-
-is( scalar(@results), 3, 'correct number of results' );
-
-my @oks = map { $_->{ok} } @results;
-
-note( 'unsorted oks: ', @oks );
-
-is_deeply( [sort @oks], [1, 1, 1], 'oks are ok' );
-
-done_testing;
-
@@ -4,7 +4,7 @@ use strict;
use warnings;
use Test::Tester tests => 8;
use Test::More;
-use Test::Version version_ok => { ignore_unindexable => 0 };
+use Test::Version qw( version_ok );
my $ret;
check_test(
@@ -4,7 +4,7 @@ use strict;
use warnings;
use Test::More;
use Test::Exception;
-use Test::Version version_ok => { ignore_unindexable => 0 };
+use Test::Version qw( version_ok );
dies_ok { version_ok; } 'croak on bad api call';
@@ -1,28 +0,0 @@
-#!/usr/bin/perl
-use 5.006;
-use strict;
-use warnings;
-use Test::Tester;
-use Test::More;
-use Test::Version version_all_ok => {
- has_version => 0,
- ignore_unindexable => 0,
- consistent => 1,
-};
-
-my ( $premature, @results ) = run_tests(
- sub {
- version_all_ok('corpus/inconsistent');
- }
-);
-
-is( scalar(@results), 3, 'correct number of results' );
-
-my @oks = map { $_->{ok} } @results;
-
-note( 'unsorted oks: ', @oks );
-
-is_deeply( [sort @oks], [0, 1, 1], 'oks are ok' );
-
-done_testing;
-
@@ -1,28 +0,0 @@
-#!/usr/bin/perl
-use 5.006;
-use strict;
-use warnings;
-use Test::Tester;
-use Test::More;
-use Test::Version version_all_ok => {
- has_version => 1,
- ignore_unindexable => 0,
- consistent => 1,
-};
-
-my ( $premature, @results ) = run_tests(
- sub {
- version_all_ok('corpus/missing');
- }
-);
-
-is( scalar(@results), 4, 'correct number of results' );
-
-my @oks = map { $_->{ok} } @results;
-
-note( 'unsorted oks: ', @oks );
-
-is_deeply( [sort @oks], [0, 0, 1, 1], 'oks are ok' );
-
-done_testing;
-
@@ -1,28 +0,0 @@
-#!/usr/bin/perl
-use 5.006;
-use strict;
-use warnings;
-use Test::Tester;
-use Test::More;
-use Test::Version version_all_ok => {
- has_version => 0,
- ignore_unindexable => 0,
- consistent => 1,
-};
-
-my ( $premature, @results ) = run_tests(
- sub {
- version_all_ok('corpus/missing');
- }
-);
-
-is( scalar(@results), 4, 'correct number of results' );
-
-my @oks = map { $_->{ok} } @results;
-
-note( 'unsorted oks: ', @oks );
-
-is_deeply( [sort @oks], [0, 1, 1, 1], 'oks are ok' );
-
-done_testing;
-
@@ -4,7 +4,7 @@ use strict;
use warnings;
use Test::More;
use Test::Exception;
-use Test::Version version_ok => { ignore_unindexable => 0 };
+use Test::Version qw( version_ok );
dies_ok { version_ok( 'corpus/nofile/nofile.pm' ) }
@@ -3,7 +3,7 @@ use 5.006;
use strict;
use warnings;
use Test::Tester tests => 7;
-use Test::Version version_ok => { ignore_unindexable => 0 };
+use Test::Version qw( version_ok );
check_test(
sub {
@@ -4,7 +4,7 @@ use strict;
use warnings;
use Test::Tester tests => 8;
use Test::More;
-use Test::Version version_ok => { ignore_unindexable => 0 };
+use Test::Version qw( version_ok );
my $ret;
check_test(
@@ -0,0 +1,19 @@
+#!perl
+
+BEGIN {
+ unless ($ENV{RELEASE_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for release candidate testing');
+ }
+}
+
+
+use strict;
+use warnings;
+
+use Test::More 0.96 tests => 2;
+use_ok('Test::CPAN::Changes');
+subtest 'changes_ok' => sub {
+ changes_file_ok('Changes');
+};
+done_testing();
@@ -0,0 +1,16 @@
+#!perl
+
+BEGIN {
+ unless ($ENV{RELEASE_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for release candidate testing');
+ }
+}
+
+
+use Test::More;
+
+eval "use Test::DistManifest";
+plan skip_all => "Test::DistManifest required for testing the manifest"
+ if $@;
+manifest_ok();
@@ -0,0 +1,15 @@
+#!perl
+
+BEGIN {
+ unless ($ENV{RELEASE_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for release candidate testing');
+ }
+}
+
+
+use Test::More;
+
+eval "use Test::CPAN::Meta";
+plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@;
+meta_yaml_ok();
@@ -0,0 +1,14 @@
+#!perl
+
+BEGIN {
+ unless ($ENV{RELEASE_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for release candidate testing');
+ }
+}
+
+
+use Test::More;
+eval 'use Test::CPAN::Meta::JSON';
+plan skip_all => 'Test::CPAN::Meta::JSON required for testing META.json' if $@;
+meta_json_ok();
@@ -0,0 +1,16 @@
+#!perl
+
+BEGIN {
+ unless ($ENV{RELEASE_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for release candidate testing');
+ }
+}
+
+
+use Test::More;
+
+eval "use Test::MinimumVersion";
+plan skip_all => "Test::MinimumVersion required for testing minimum versions"
+ if $@;
+all_minimum_version_from_metayml_ok();
@@ -0,0 +1,20 @@
+#!perl
+
+BEGIN {
+ unless ($ENV{RELEASE_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for release candidate testing');
+ }
+}
+
+
+use strict;
+use warnings qw(all);
+
+use Test::More;
+
+## no critic (ProhibitStringyEval, RequireCheckingReturnValueOfEval)
+eval q(use Test::Mojibake);
+plan skip_all => q(Test::Mojibake required for source encoding testing) if $@;
+
+all_files_encoding_ok();
@@ -0,0 +1,21 @@
+#!perl
+
+BEGIN {
+ unless ($ENV{RELEASE_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for release candidate testing');
+ }
+}
+
+
+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 $@;
+
+all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' });
@@ -0,0 +1,28 @@
+#!perl
+
+BEGIN {
+ unless ($ENV{RELEASE_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for release candidate testing');
+ }
+}
+
+
+use strict;
+use warnings;
+use Test::More;
+
+foreach my $env_skip ( qw(
+ SKIP_POD_LINKCHECK
+) ){
+ plan skip_all => "\$ENV{$env_skip} is set, skipping"
+ if $ENV{$env_skip};
+}
+
+eval "use Test::Pod::LinkCheck";
+if ( $@ ) {
+ plan skip_all => 'Test::Pod::LinkCheck required for testing POD';
+}
+else {
+ Test::Pod::LinkCheck->new->all_pod_ok;
+}
@@ -0,0 +1,15 @@
+#!perl
+
+BEGIN {
+ unless ($ENV{RELEASE_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for release candidate testing');
+ }
+}
+
+use Test::More;
+
+eval "use Test::Pod 1.41";
+plan skip_all => "Test::Pod 1.41 required for testing POD" if $@;
+
+all_pod_files_ok();
@@ -0,0 +1,19 @@
+#!perl
+
+BEGIN {
+ unless ($ENV{RELEASE_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for release candidate testing');
+ }
+}
+
+
+use strict;
+use warnings;
+
+use Test::More;
+
+eval 'use Test::Portability::Files';
+plan skip_all => 'Test::Portability::Files required for testing portability'
+ if $@;
+run_tests();
@@ -0,0 +1,16 @@
+#!perl
+
+BEGIN {
+ unless ($ENV{RELEASE_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for release candidate testing');
+ }
+}
+
+
+use Test::More;
+
+eval "use Test::Synopsis";
+plan skip_all => "Test::Synopsis required for testing synopses"
+ if $@;
+all_synopsis_ok();
@@ -0,0 +1,30 @@
+
+BEGIN {
+ unless ($ENV{RELEASE_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for release candidate testing');
+ }
+}
+
+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;
@@ -0,0 +1,16 @@
+#!perl
+
+BEGIN {
+ unless ($ENV{RELEASE_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for release candidate testing');
+ }
+}
+
+
+use Test::More;
+
+eval "use Test::Vars";
+plan skip_all => "Test::Vars required for testing unused vars"
+ if $@;
+all_vars_ok();
@@ -4,10 +4,7 @@ use strict;
use warnings;
use Test::Tester;
use Test::More;
-use Test::Version version_ok => {
- is_strict => 1,
- ignore_unindexable => 0,
-};
+use Test::Version qw( version_ok ), { is_strict => 1 };
my $ret;
check_test(
@@ -1,12 +0,0 @@
-#!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();
@@ -1,8 +0,0 @@
-use strict;
-use warnings;
-use Test::More;
-
-# generated by Dist::Zilla::Plugin::Test::EOL 0.12
-use Test::EOL;
-
-all_perl_files_ok({ trailing_whitespace => 1 });
@@ -1,11 +0,0 @@
-#!perl
-
-use strict;
-use warnings;
-
-use Test::More 0.96 tests => 2;
-use_ok('Test::CPAN::Changes');
-subtest 'changes_ok' => sub {
- changes_file_ok('Changes');
-};
-done_testing();
@@ -1,8 +0,0 @@
-#!perl
-
-use Test::More;
-
-eval "use Test::DistManifest";
-plan skip_all => "Test::DistManifest required for testing the manifest"
- if $@;
-manifest_ok();
@@ -1,6 +0,0 @@
-#!perl
-
-use Test::More;
-eval 'use Test::CPAN::Meta::JSON';
-plan skip_all => 'Test::CPAN::Meta::JSON required for testing META.json' if $@;
-meta_json_ok();
@@ -1,8 +0,0 @@
-#!perl
-
-use Test::More;
-
-eval "use Test::MinimumVersion";
-plan skip_all => "Test::MinimumVersion required for testing minimum versions"
- if $@;
-all_minimum_version_from_metayml_ok();
@@ -1,7 +0,0 @@
-#!perl
-# This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests.
-
-use Test::Pod::Coverage 1.08;
-use Pod::Coverage::TrustPod;
-
-all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' });
@@ -1,6 +0,0 @@
-#!perl
-# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
-use Test::More;
-use Test::Pod 1.41;
-
-all_pod_files_ok();
@@ -1,11 +0,0 @@
-#!perl
-
-use strict;
-use warnings;
-
-use Test::More;
-
-eval 'use Test::Portability::Files';
-plan skip_all => 'Test::Portability::Files required for testing portability'
- if $@;
-run_tests();
@@ -1,22 +0,0 @@
-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;
@@ -1,14 +0,0 @@
-#!perl
-
-use Test::More 0.96 tests => 1;
-eval { require Test::Vars };
-
-SKIP: {
- skip 1 => 'Test::Vars required for testing for unused vars'
- if $@;
- Test::Vars->import;
-
- subtest 'unused vars' => sub {
-all_vars_ok();
- };
-};