Imported Upstream version 0.08
Axel Beckert
7 years ago
0 | 0 | Revision history for Dist-Zilla-Plugin-OurPkgVersion |
1 | ||
2 | 0.08 2016-04-24 | |
3 | - Dist::Zilla 5.x / 6.x and future 7.x compatability | |
4 | ||
5 | 0.07 2016-03-07 | |
6 | - Use Dist::Zilla::Role::PPI to avoid reparsing documents (new GH #1) | |
7 | ||
8 | 0.06 2015-05-04 | |
9 | - Use [Test::ReportPrereqs] instead of [ReportVersions::Tiny] to remove | |
10 | deprecation warning during dzil build. | |
11 | - Use new github repository in meta | |
1 | 12 | |
2 | 13 | 0.005001 2013-12-16 |
3 | 14 | - update compile test so that it doesn't hang on windows GH #11 ( chorny ) |
0 | This software is Copyright (c) 2013 by Caleb Cushing. | |
0 | This software is Copyright (c) 2016 by Caleb Cushing. | |
1 | 1 | |
2 | 2 | This is free software, licensed under: |
3 | 3 |
0 | # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.003. | |
0 | 1 | Changes |
1 | 2 | LICENSE |
2 | 3 | MANIFEST |
18 | 19 | lib/Dist/Zilla/Plugin/OurPkgVersion.pm |
19 | 20 | perlcritic.rc |
20 | 21 | t/00-compile.t |
21 | t/000-report-versions-tiny.t | |
22 | t/00-report-prereqs.dd | |
23 | t/00-report-prereqs.t | |
22 | 24 | t/01-basic.t |
23 | 25 | t/02-vstring.t |
24 | 26 | t/03-trial.t |
25 | 27 | t/author-critic.t |
28 | t/author-eol.t | |
29 | t/author-mojibake.t | |
30 | t/author-pod-coverage.t | |
26 | 31 | t/author-pod-spell.t |
27 | t/author-test-eol.t | |
32 | t/author-pod-syntax.t | |
33 | t/author-test-version.t | |
28 | 34 | t/release-cpan-changes.t |
29 | 35 | t/release-dist-manifest.t |
30 | 36 | t/release-distmeta.t |
31 | 37 | t/release-kwalitee.t |
32 | 38 | t/release-meta-json.t |
33 | 39 | t/release-minimum-version.t |
34 | t/release-mojibake.t | |
35 | t/release-pod-coverage.t | |
36 | 40 | t/release-pod-linkcheck.t |
37 | t/release-pod-syntax.t | |
38 | 41 | t/release-portability.t |
39 | t/release-test-version.t | |
40 | 42 | t/release-unused-vars.t |
0 | 0 | { |
1 | "abstract" : "no line insertion and does Package version with our", | |
1 | "abstract" : "No line insertion and does Package version with our", | |
2 | 2 | "author" : [ |
3 | "Caleb Cushing <xenoterracide@gmail.com>" | |
3 | "Caleb Cushing <xenoterracide@gmail.com>", | |
4 | "Grahan Ollis <plicease@cpan.org>" | |
4 | 5 | ], |
5 | 6 | "dynamic_config" : 0, |
6 | "generated_by" : "Dist::Zilla version 5.006, CPAN::Meta::Converter version 2.133380", | |
7 | "generated_by" : "Dist::Zilla version 6.003, CPAN::Meta::Converter version 2.150005", | |
7 | 8 | "license" : [ |
8 | 9 | "artistic_2" |
9 | 10 | ], |
10 | 11 | "meta-spec" : { |
11 | 12 | "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", |
12 | "version" : "2" | |
13 | "version" : 2 | |
13 | 14 | }, |
14 | 15 | "name" : "Dist-Zilla-Plugin-OurPkgVersion", |
15 | 16 | "no_index" : { |
23 | 24 | "prereqs" : { |
24 | 25 | "configure" : { |
25 | 26 | "requires" : { |
26 | "ExtUtils::MakeMaker" : "6.30" | |
27 | "ExtUtils::MakeMaker" : "0" | |
27 | 28 | } |
28 | 29 | }, |
29 | 30 | "develop" : { |
31 | 32 | "Pod::Coverage::TrustPod" : "0", |
32 | 33 | "Test::CPAN::Changes" : "0.19", |
33 | 34 | "Test::CPAN::Meta" : "0", |
34 | "Test::Kwalitee" : "1.12", | |
35 | "Test::CPAN::Meta::JSON" : "0.16", | |
36 | "Test::EOL" : "0", | |
37 | "Test::Kwalitee" : "1.21", | |
38 | "Test::Mojibake" : "0", | |
39 | "Test::More" : "0.88", | |
35 | 40 | "Test::Pod" : "1.41", |
36 | 41 | "Test::Pod::Coverage" : "1.08", |
37 | "version" : "0.9901" | |
42 | "Test::Pod::LinkCheck" : "0", | |
43 | "Test::Spelling" : "0.12", | |
44 | "Test::Version" : "1" | |
38 | 45 | } |
39 | 46 | }, |
40 | 47 | "runtime" : { |
41 | 48 | "requires" : { |
42 | 49 | "Dist::Zilla::Role::FileFinderUser" : "0", |
43 | 50 | "Dist::Zilla::Role::FileMunger" : "0", |
51 | "Dist::Zilla::Role::PPI" : "0", | |
44 | 52 | "Moose" : "0", |
45 | 53 | "MooseX::Types::Perl" : "0", |
46 | 54 | "PPI" : "0", |
51 | 59 | } |
52 | 60 | }, |
53 | 61 | "test" : { |
62 | "recommends" : { | |
63 | "CPAN::Meta" : "2.120900" | |
64 | }, | |
54 | 65 | "requires" : { |
66 | "ExtUtils::MakeMaker" : "0", | |
55 | 67 | "File::Spec" : "0", |
56 | 68 | "IO::Handle" : "0", |
57 | 69 | "IPC::Open3" : "0", |
70 | "Path::Class" : "0", | |
58 | 71 | "Test::DZil" : "0", |
59 | "Test::More" : "0.88", | |
60 | "Test::Version" : "0.04" | |
72 | "Test::More" : "0", | |
73 | "Test::Version" : "0.04", | |
74 | "blib" : "1.01" | |
61 | 75 | } |
62 | 76 | } |
63 | 77 | }, |
64 | 78 | "release_status" : "stable", |
65 | 79 | "resources" : { |
66 | 80 | "bugtracker" : { |
67 | "web" : "https://github.com/xenoterracide/dist-zilla-plugin-ourpkgversion/issues" | |
81 | "web" : "https://github.com/plicease/dist-zilla-plugin-ourpkgversion/issues" | |
68 | 82 | }, |
69 | 83 | "homepage" : "https://metacpan.org/dist/Dist-Zilla-Plugin-OurPkgVersion", |
70 | 84 | "repository" : { |
71 | 85 | "type" : "git", |
72 | "url" : "git://github.com/xenoterracide/dist-zilla-plugin-ourpkgversion.git", | |
73 | "web" : "https://github.com/xenoterracide/dist-zilla-plugin-ourpkgversion" | |
86 | "url" : "git://github.com/plicease/dist-zilla-plugin-ourpkgversion.git", | |
87 | "web" : "https://github.com/plicease/dist-zilla-plugin-ourpkgversion" | |
74 | 88 | } |
75 | 89 | }, |
76 | "version" : "0.005001", | |
90 | "version" : "0.08", | |
77 | 91 | "x_contributors" : [ |
78 | 92 | "Alexandr Ciornii <alexchorny@gmail.com>", |
79 | 93 | "Alexei Znamensky <russoz@cpan.org>", |
80 | 94 | "Christian Walde <walde.christian@googlemail.com>", |
81 | 95 | "Christopher J. Madsen <perl@cjmweb.net>", |
82 | "David Golden <dagolden@cpan.org>" | |
96 | "David Golden <dagolden@cpan.org>", | |
97 | "Graham Ollis <perl@wdlabs.com>", | |
98 | "Graham Ollis <plicease@cpan.org>" | |
83 | 99 | ] |
84 | 100 | } |
85 | 101 |
0 | 0 | --- |
1 | abstract: 'no line insertion and does Package version with our' | |
1 | abstract: 'No line insertion and does Package version with our' | |
2 | 2 | author: |
3 | 3 | - 'Caleb Cushing <xenoterracide@gmail.com>' |
4 | - 'Grahan Ollis <plicease@cpan.org>' | |
4 | 5 | build_requires: |
5 | File::Spec: 0 | |
6 | IO::Handle: 0 | |
7 | IPC::Open3: 0 | |
8 | Test::DZil: 0 | |
9 | Test::More: 0.88 | |
10 | Test::Version: 0.04 | |
6 | ExtUtils::MakeMaker: '0' | |
7 | File::Spec: '0' | |
8 | IO::Handle: '0' | |
9 | IPC::Open3: '0' | |
10 | Path::Class: '0' | |
11 | Test::DZil: '0' | |
12 | Test::More: '0' | |
13 | Test::Version: '0.04' | |
14 | blib: '1.01' | |
11 | 15 | configure_requires: |
12 | ExtUtils::MakeMaker: 6.30 | |
16 | ExtUtils::MakeMaker: '0' | |
13 | 17 | dynamic_config: 0 |
14 | generated_by: 'Dist::Zilla version 5.006, CPAN::Meta::Converter version 2.133380' | |
18 | generated_by: 'Dist::Zilla version 6.003, CPAN::Meta::Converter version 2.150005' | |
15 | 19 | license: artistic_2 |
16 | 20 | meta-spec: |
17 | 21 | url: http://module-build.sourceforge.net/META-spec-v1.4.html |
18 | version: 1.4 | |
22 | version: '1.4' | |
19 | 23 | name: Dist-Zilla-Plugin-OurPkgVersion |
20 | 24 | no_index: |
21 | 25 | directory: |
23 | 27 | file: |
24 | 28 | - perlcritic.rc |
25 | 29 | requires: |
26 | Dist::Zilla::Role::FileFinderUser: 0 | |
27 | Dist::Zilla::Role::FileMunger: 0 | |
28 | Moose: 0 | |
29 | MooseX::Types::Perl: 0 | |
30 | PPI: 0 | |
31 | namespace::autoclean: 0 | |
32 | perl: 5.008 | |
33 | strict: 0 | |
34 | warnings: 0 | |
30 | Dist::Zilla::Role::FileFinderUser: '0' | |
31 | Dist::Zilla::Role::FileMunger: '0' | |
32 | Dist::Zilla::Role::PPI: '0' | |
33 | Moose: '0' | |
34 | MooseX::Types::Perl: '0' | |
35 | PPI: '0' | |
36 | namespace::autoclean: '0' | |
37 | perl: '5.008' | |
38 | strict: '0' | |
39 | warnings: '0' | |
35 | 40 | resources: |
36 | bugtracker: https://github.com/xenoterracide/dist-zilla-plugin-ourpkgversion/issues | |
41 | bugtracker: https://github.com/plicease/dist-zilla-plugin-ourpkgversion/issues | |
37 | 42 | homepage: https://metacpan.org/dist/Dist-Zilla-Plugin-OurPkgVersion |
38 | repository: git://github.com/xenoterracide/dist-zilla-plugin-ourpkgversion.git | |
39 | version: 0.005001 | |
43 | repository: git://github.com/plicease/dist-zilla-plugin-ourpkgversion.git | |
44 | version: '0.08' | |
40 | 45 | x_contributors: |
41 | 46 | - 'Alexandr Ciornii <alexchorny@gmail.com>' |
42 | 47 | - 'Alexei Znamensky <russoz@cpan.org>' |
43 | 48 | - 'Christian Walde <walde.christian@googlemail.com>' |
44 | 49 | - 'Christopher J. Madsen <perl@cjmweb.net>' |
45 | 50 | - 'David Golden <dagolden@cpan.org>' |
51 | - 'Graham Ollis <perl@wdlabs.com>' | |
52 | - 'Graham Ollis <plicease@cpan.org>' |
0 | ||
0 | # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.003. | |
1 | 1 | use strict; |
2 | 2 | use warnings; |
3 | 3 | |
4 | 4 | use 5.008; |
5 | 5 | |
6 | use ExtUtils::MakeMaker 6.30; | |
7 | ||
8 | ||
6 | use ExtUtils::MakeMaker; | |
9 | 7 | |
10 | 8 | my %WriteMakefileArgs = ( |
11 | "ABSTRACT" => "no line insertion and does Package version with our", | |
12 | "AUTHOR" => "Caleb Cushing <xenoterracide\@gmail.com>", | |
13 | "BUILD_REQUIRES" => {}, | |
9 | "ABSTRACT" => "No line insertion and does Package version with our", | |
10 | "AUTHOR" => "Caleb Cushing <xenoterracide\@gmail.com>, Grahan Ollis <plicease\@cpan.org>", | |
14 | 11 | "CONFIGURE_REQUIRES" => { |
15 | "ExtUtils::MakeMaker" => "6.30" | |
12 | "ExtUtils::MakeMaker" => 0 | |
16 | 13 | }, |
17 | 14 | "DISTNAME" => "Dist-Zilla-Plugin-OurPkgVersion", |
18 | "EXE_FILES" => [], | |
19 | 15 | "LICENSE" => "artistic_2", |
16 | "MIN_PERL_VERSION" => "5.008", | |
20 | 17 | "NAME" => "Dist::Zilla::Plugin::OurPkgVersion", |
21 | 18 | "PREREQ_PM" => { |
22 | 19 | "Dist::Zilla::Role::FileFinderUser" => 0, |
23 | 20 | "Dist::Zilla::Role::FileMunger" => 0, |
21 | "Dist::Zilla::Role::PPI" => 0, | |
24 | 22 | "Moose" => 0, |
25 | 23 | "MooseX::Types::Perl" => 0, |
26 | 24 | "PPI" => 0, |
29 | 27 | "warnings" => 0 |
30 | 28 | }, |
31 | 29 | "TEST_REQUIRES" => { |
30 | "ExtUtils::MakeMaker" => 0, | |
32 | 31 | "File::Spec" => 0, |
33 | 32 | "IO::Handle" => 0, |
34 | 33 | "IPC::Open3" => 0, |
34 | "Path::Class" => 0, | |
35 | 35 | "Test::DZil" => 0, |
36 | "Test::More" => "0.88", | |
37 | "Test::Version" => "0.04" | |
36 | "Test::More" => 0, | |
37 | "Test::Version" => "0.04", | |
38 | "blib" => "1.01" | |
38 | 39 | }, |
39 | "VERSION" => "0.005001", | |
40 | "VERSION" => "0.08", | |
40 | 41 | "test" => { |
41 | 42 | "TESTS" => "t/*.t" |
42 | 43 | } |
46 | 47 | my %FallbackPrereqs = ( |
47 | 48 | "Dist::Zilla::Role::FileFinderUser" => 0, |
48 | 49 | "Dist::Zilla::Role::FileMunger" => 0, |
50 | "Dist::Zilla::Role::PPI" => 0, | |
51 | "ExtUtils::MakeMaker" => 0, | |
49 | 52 | "File::Spec" => 0, |
50 | 53 | "IO::Handle" => 0, |
51 | 54 | "IPC::Open3" => 0, |
52 | 55 | "Moose" => 0, |
53 | 56 | "MooseX::Types::Perl" => 0, |
54 | 57 | "PPI" => 0, |
58 | "Path::Class" => 0, | |
55 | 59 | "Test::DZil" => 0, |
56 | "Test::More" => "0.88", | |
60 | "Test::More" => 0, | |
57 | 61 | "Test::Version" => "0.04", |
62 | "blib" => "1.01", | |
58 | 63 | "namespace::autoclean" => 0, |
59 | 64 | "strict" => 0, |
60 | 65 | "warnings" => 0 |
71 | 76 | unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; |
72 | 77 | |
73 | 78 | WriteMakefile(%WriteMakefileArgs); |
74 | ||
75 | ||
76 |
0 | 0 | NAME |
1 | Dist::Zilla::Plugin::OurPkgVersion - no line insertion and does Package | |
1 | ||
2 | Dist::Zilla::Plugin::OurPkgVersion - No line insertion and does Package | |
2 | 3 | version with our |
3 | 4 | |
4 | 5 | VERSION |
5 | version 0.005001 | |
6 | ||
7 | version 0.08 | |
6 | 8 | |
7 | 9 | SYNOPSIS |
10 | ||
8 | 11 | in dist.ini |
9 | 12 | |
10 | 13 | [OurPkgVersion] |
14 | 17 | # VERSION |
15 | 18 | |
16 | 19 | DESCRIPTION |
20 | ||
17 | 21 | This module was created as an alternative to |
18 | 22 | Dist::Zilla::Plugin::PkgVersion and uses some code from that module. |
19 | This module is designed to use a the more readable format "our $VERSION | |
20 | = $version;" as well as not change then number of lines of code in your | |
23 | This module is designed to use a the more readable format our $VERSION | |
24 | = $version; as well as not change then number of lines of code in your | |
21 | 25 | files, which will keep your repository more in sync with your CPAN |
22 | 26 | release. It also allows you slightly more freedom in how you specify |
23 | 27 | your version. |
24 | 28 | |
25 | EXAMPLES | |
29 | EXAMPLES | |
30 | ||
26 | 31 | in dist.ini |
27 | 32 | |
28 | 33 | ... |
86 | 91 | ... |
87 | 92 | |
88 | 93 | Also note, the package line is not in any way significant, it will |
89 | insert the "our $VERSION" line anywhere in the file before "# VERSION" | |
90 | as many times as you've written "# VERSION" regardless of whether or not | |
94 | insert the our $VERSION line anywhere in the file before # VERSION as | |
95 | many times as you've written # VERSION regardless of whether or not | |
91 | 96 | inserting it there is a good idea. OurPkgVersion will not insert a |
92 | version unless you have "# VERSION" so it is a bit more work. | |
97 | version unless you have # VERSION so it is a bit more work. | |
93 | 98 | |
94 | 99 | If you make a trial release, the comment will be altered to say so: |
95 | 100 | |
100 | 105 | our $VERSION = '0.01'; # TRIAL VERSION |
101 | 106 | |
102 | 107 | METHODS |
108 | ||
103 | 109 | munge_files |
104 | Override the default provided by Dist::Zilla::Role::FileMunger to | |
105 | limit the number of files to search to only be modules and | |
106 | executables. | |
110 | ||
111 | Override the default provided by Dist::Zilla::Role::FileMunger to | |
112 | limit the number of files to search to only be modules and | |
113 | executables. | |
107 | 114 | |
108 | 115 | munge_file |
109 | tells which files to munge, see Dist::Zilla::Role::FileMunger | |
116 | ||
117 | tells which files to munge, see Dist::Zilla::Role::FileMunger | |
110 | 118 | |
111 | 119 | BUGS |
120 | ||
112 | 121 | Please report any bugs or feature requests on the bugtracker website |
113 | https://github.com/xenoterracide/dist-zilla-plugin-ourpkgversion/issues | |
122 | https://github.com/plicease/dist-zilla-plugin-ourpkgversion/issues | |
114 | 123 | |
115 | 124 | When submitting a bug or request, please include a test-file or a patch |
116 | 125 | to an existing test-file that illustrates the bug or desired feature. |
117 | 126 | |
118 | 127 | CONTRIBUTORS |
119 | * Alexandr Ciornii <alexchorny@gmail.com> | |
120 | 128 | |
121 | * Alexei Znamensky <russoz@cpan.org> | |
129 | * Alexandr Ciornii <alexchorny@gmail.com> | |
122 | 130 | |
123 | * Christian Walde <walde.christian@googlemail.com> | |
131 | * Alexei Znamensky <russoz@cpan.org> | |
124 | 132 | |
125 | * Christopher J. Madsen <perl@cjmweb.net> | |
133 | * Christian Walde <walde.christian@googlemail.com> | |
126 | 134 | |
127 | * David Golden <dagolden@cpan.org> | |
135 | * Christopher J. Madsen <perl@cjmweb.net> | |
128 | 136 | |
129 | AUTHOR | |
130 | Caleb Cushing <xenoterracide@gmail.com> | |
137 | * David Golden <dagolden@cpan.org> | |
138 | ||
139 | * Graham Ollis <perl@wdlabs.com> | |
140 | ||
141 | * Graham Ollis <plicease@cpan.org> | |
142 | ||
143 | AUTHORS | |
144 | ||
145 | * Caleb Cushing <xenoterracide@gmail.com> | |
146 | ||
147 | * Grahan Ollis <plicease@cpan.org> | |
131 | 148 | |
132 | 149 | COPYRIGHT AND LICENSE |
133 | This software is Copyright (c) 2013 by Caleb Cushing. | |
150 | ||
151 | This software is Copyright (c) 2016 by Caleb Cushing. | |
134 | 152 | |
135 | 153 | This is free software, licensed under: |
136 | 154 |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | 4 | |
5 | our $VERSION = '0.005001'; # VERSION | |
5 | our $VERSION = '0.08'; # VERSION | |
6 | 6 | |
7 | 7 | use Moose; |
8 | 8 | with ( |
10 | 10 | 'Dist::Zilla::Role::FileFinderUser' => { |
11 | 11 | default_finders => [ ':InstallModules', ':ExecFiles' ], |
12 | 12 | }, |
13 | 'Dist::Zilla::Role::PPI', | |
13 | 14 | ); |
14 | 15 | |
15 | 16 | use PPI; |
36 | 37 | confess 'invalid characters in version' |
37 | 38 | unless LaxVersionStr->check( $version ); |
38 | 39 | |
39 | my $content = $file->content; | |
40 | ||
41 | my $doc = PPI::Document->new(\$content) | |
42 | or $self->log( 'Skipping: "' | |
43 | . $file->name | |
44 | . '" error with PPI: ' | |
45 | . PPI::Document->errstr | |
46 | ) | |
47 | ; | |
40 | my $doc = $self->ppi_document_for_file($file); | |
48 | 41 | |
49 | 42 | return unless defined $doc; |
50 | 43 | |
78 | 71 | . qq{'; $comment} |
79 | 72 | ; |
80 | 73 | $_->set_content("$code"); |
81 | $file->content( $doc->serialize ); | |
82 | 74 | $munged_version++; |
83 | 75 | } |
84 | 76 | } |
85 | 77 | } |
86 | 78 | |
87 | 79 | if ( $munged_version ) { |
80 | $self->save_ppi_document_to_file( $doc, $file); | |
88 | 81 | $self->log_debug([ 'adding $VERSION assignment to %s', $file->name ]); |
89 | 82 | } |
90 | 83 | else { |
97 | 90 | } |
98 | 91 | __PACKAGE__->meta->make_immutable; |
99 | 92 | 1; |
100 | # ABSTRACT: no line insertion and does Package version with our | |
93 | # ABSTRACT: No line insertion and does Package version with our | |
101 | 94 | |
102 | 95 | __END__ |
103 | 96 | |
105 | 98 | |
106 | 99 | =head1 NAME |
107 | 100 | |
108 | Dist::Zilla::Plugin::OurPkgVersion - no line insertion and does Package version with our | |
101 | Dist::Zilla::Plugin::OurPkgVersion - No line insertion and does Package version with our | |
109 | 102 | |
110 | 103 | =head1 VERSION |
111 | 104 | |
112 | version 0.005001 | |
105 | version 0.08 | |
113 | 106 | |
114 | 107 | =head1 SYNOPSIS |
115 | 108 | |
226 | 219 | =head1 BUGS |
227 | 220 | |
228 | 221 | Please report any bugs or feature requests on the bugtracker website |
229 | https://github.com/xenoterracide/dist-zilla-plugin-ourpkgversion/issues | |
222 | https://github.com/plicease/dist-zilla-plugin-ourpkgversion/issues | |
230 | 223 | |
231 | 224 | When submitting a bug or request, please include a test-file or a |
232 | 225 | patch to an existing test-file that illustrates the bug or desired |
234 | 227 | |
235 | 228 | =head1 CONTRIBUTORS |
236 | 229 | |
230 | =for stopwords Alexandr Ciornii Alexei Znamensky Christian Walde Christopher J. Madsen David Golden Graham Ollis | |
231 | ||
237 | 232 | =over 4 |
238 | 233 | |
239 | 234 | =item * |
256 | 251 | |
257 | 252 | David Golden <dagolden@cpan.org> |
258 | 253 | |
254 | =item * | |
255 | ||
256 | Graham Ollis <perl@wdlabs.com> | |
257 | ||
258 | =item * | |
259 | ||
260 | Graham Ollis <plicease@cpan.org> | |
261 | ||
259 | 262 | =back |
260 | 263 | |
261 | =head1 AUTHOR | |
264 | =head1 AUTHORS | |
265 | ||
266 | =over 4 | |
267 | ||
268 | =item * | |
262 | 269 | |
263 | 270 | Caleb Cushing <xenoterracide@gmail.com> |
264 | 271 | |
272 | =item * | |
273 | ||
274 | Grahan Ollis <plicease@cpan.org> | |
275 | ||
276 | =back | |
277 | ||
265 | 278 | =head1 COPYRIGHT AND LICENSE |
266 | 279 | |
267 | This software is Copyright (c) 2013 by Caleb Cushing. | |
280 | This software is Copyright (c) 2016 by Caleb Cushing. | |
268 | 281 | |
269 | 282 | This is free software, licensed under: |
270 | 283 |
1 | 1 | use strict; |
2 | 2 | use warnings; |
3 | 3 | |
4 | # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.039 | |
4 | # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.054 | |
5 | 5 | |
6 | use Test::More tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0); | |
6 | use Test::More; | |
7 | 7 | |
8 | ||
8 | plan tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0); | |
9 | 9 | |
10 | 10 | my @module_files = ( |
11 | 11 | 'Dist/Zilla/Plugin/OurPkgVersion.pm' |
35 | 35 | waitpid($pid, 0); |
36 | 36 | is($?, 0, "$lib loaded ok"); |
37 | 37 | |
38 | shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ | |
39 | and not eval { require blib; blib->VERSION('1.01') }; | |
40 | ||
38 | 41 | if (@_warnings) |
39 | 42 | { |
40 | 43 | warn @_warnings; |
44 | 47 | |
45 | 48 | |
46 | 49 | |
47 | is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING}; | |
50 | is(scalar(@warnings), 0, 'no warnings found') | |
51 | or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if $ENV{AUTHOR_TESTING}; | |
48 | 52 | |
49 | 53 |
0 | do { my $x = { | |
1 | 'configure' => { | |
2 | 'requires' => { | |
3 | 'ExtUtils::MakeMaker' => '0' | |
4 | } | |
5 | }, | |
6 | 'develop' => { | |
7 | 'requires' => { | |
8 | 'Pod::Coverage::TrustPod' => '0', | |
9 | 'Test::CPAN::Changes' => '0.19', | |
10 | 'Test::CPAN::Meta' => '0', | |
11 | 'Test::CPAN::Meta::JSON' => '0.16', | |
12 | 'Test::EOL' => '0', | |
13 | 'Test::Kwalitee' => '1.21', | |
14 | 'Test::Mojibake' => '0', | |
15 | 'Test::More' => '0.88', | |
16 | 'Test::Pod' => '1.41', | |
17 | 'Test::Pod::Coverage' => '1.08', | |
18 | 'Test::Pod::LinkCheck' => '0', | |
19 | 'Test::Spelling' => '0.12', | |
20 | 'Test::Version' => '1' | |
21 | } | |
22 | }, | |
23 | 'runtime' => { | |
24 | 'requires' => { | |
25 | 'Dist::Zilla::Role::FileFinderUser' => '0', | |
26 | 'Dist::Zilla::Role::FileMunger' => '0', | |
27 | 'Dist::Zilla::Role::PPI' => '0', | |
28 | 'Moose' => '0', | |
29 | 'MooseX::Types::Perl' => '0', | |
30 | 'PPI' => '0', | |
31 | 'namespace::autoclean' => '0', | |
32 | 'perl' => '5.008', | |
33 | 'strict' => '0', | |
34 | 'warnings' => '0' | |
35 | } | |
36 | }, | |
37 | 'test' => { | |
38 | 'recommends' => { | |
39 | 'CPAN::Meta' => '2.120900' | |
40 | }, | |
41 | 'requires' => { | |
42 | 'ExtUtils::MakeMaker' => '0', | |
43 | 'File::Spec' => '0', | |
44 | 'IO::Handle' => '0', | |
45 | 'IPC::Open3' => '0', | |
46 | 'Path::Class' => '0', | |
47 | 'Test::DZil' => '0', | |
48 | 'Test::More' => '0', | |
49 | 'Test::Version' => '0.04', | |
50 | 'blib' => '1.01' | |
51 | } | |
52 | } | |
53 | }; | |
54 | $x; | |
55 | }⏎ |
0 | #!perl | |
1 | ||
2 | use strict; | |
3 | use warnings; | |
4 | ||
5 | # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.024 | |
6 | ||
7 | use Test::More tests => 1; | |
8 | ||
9 | use ExtUtils::MakeMaker; | |
10 | use File::Spec; | |
11 | ||
12 | # from $version::LAX | |
13 | my $lax_version_re = | |
14 | qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? | |
15 | | | |
16 | (?:\.[0-9]+) (?:_[0-9]+)? | |
17 | ) | (?: | |
18 | v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? | |
19 | | | |
20 | (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? | |
21 | ) | |
22 | )/x; | |
23 | ||
24 | # hide optional CPAN::Meta modules from prereq scanner | |
25 | # and check if they are available | |
26 | my $cpan_meta = "CPAN::Meta"; | |
27 | my $cpan_meta_pre = "CPAN::Meta::Prereqs"; | |
28 | my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic | |
29 | ||
30 | # Verify requirements? | |
31 | my $DO_VERIFY_PREREQS = 1; | |
32 | ||
33 | sub _max { | |
34 | my $max = shift; | |
35 | $max = ( $_ > $max ) ? $_ : $max for @_; | |
36 | return $max; | |
37 | } | |
38 | ||
39 | sub _merge_prereqs { | |
40 | my ($collector, $prereqs) = @_; | |
41 | ||
42 | # CPAN::Meta::Prereqs object | |
43 | if (ref $collector eq $cpan_meta_pre) { | |
44 | return $collector->with_merged_prereqs( | |
45 | CPAN::Meta::Prereqs->new( $prereqs ) | |
46 | ); | |
47 | } | |
48 | ||
49 | # Raw hashrefs | |
50 | for my $phase ( keys %$prereqs ) { | |
51 | for my $type ( keys %{ $prereqs->{$phase} } ) { | |
52 | for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { | |
53 | $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; | |
54 | } | |
55 | } | |
56 | } | |
57 | ||
58 | return $collector; | |
59 | } | |
60 | ||
61 | my @include = qw( | |
62 | ||
63 | ); | |
64 | ||
65 | my @exclude = qw( | |
66 | ||
67 | ); | |
68 | ||
69 | # Add static prereqs to the included modules list | |
70 | my $static_prereqs = do 't/00-report-prereqs.dd'; | |
71 | ||
72 | # Merge all prereqs (either with ::Prereqs or a hashref) | |
73 | my $full_prereqs = _merge_prereqs( | |
74 | ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), | |
75 | $static_prereqs | |
76 | ); | |
77 | ||
78 | # Add dynamic prereqs to the included modules list (if we can) | |
79 | my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; | |
80 | if ( $source && $HAS_CPAN_META ) { | |
81 | if ( my $meta = eval { CPAN::Meta->load_file($source) } ) { | |
82 | $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); | |
83 | } | |
84 | } | |
85 | else { | |
86 | $source = 'static metadata'; | |
87 | } | |
88 | ||
89 | my @full_reports; | |
90 | my @dep_errors; | |
91 | my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; | |
92 | ||
93 | # Add static includes into a fake section | |
94 | for my $mod (@include) { | |
95 | $req_hash->{other}{modules}{$mod} = 0; | |
96 | } | |
97 | ||
98 | for my $phase ( qw(configure build test runtime develop other) ) { | |
99 | next unless $req_hash->{$phase}; | |
100 | next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); | |
101 | ||
102 | for my $type ( qw(requires recommends suggests conflicts modules) ) { | |
103 | next unless $req_hash->{$phase}{$type}; | |
104 | ||
105 | my $title = ucfirst($phase).' '.ucfirst($type); | |
106 | my @reports = [qw/Module Want Have/]; | |
107 | ||
108 | for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { | |
109 | next if $mod eq 'perl'; | |
110 | next if grep { $_ eq $mod } @exclude; | |
111 | ||
112 | my $file = $mod; | |
113 | $file =~ s{::}{/}g; | |
114 | $file .= ".pm"; | |
115 | my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; | |
116 | ||
117 | my $want = $req_hash->{$phase}{$type}{$mod}; | |
118 | $want = "undef" unless defined $want; | |
119 | $want = "any" if !$want && $want == 0; | |
120 | ||
121 | my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; | |
122 | ||
123 | if ($prefix) { | |
124 | my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); | |
125 | $have = "undef" unless defined $have; | |
126 | push @reports, [$mod, $want, $have]; | |
127 | ||
128 | if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { | |
129 | if ( $have !~ /\A$lax_version_re\z/ ) { | |
130 | push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; | |
131 | } | |
132 | elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { | |
133 | push @dep_errors, "$mod version '$have' is not in required range '$want'"; | |
134 | } | |
135 | } | |
136 | } | |
137 | else { | |
138 | push @reports, [$mod, $want, "missing"]; | |
139 | ||
140 | if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { | |
141 | push @dep_errors, "$mod is not installed ($req_string)"; | |
142 | } | |
143 | } | |
144 | } | |
145 | ||
146 | if ( @reports ) { | |
147 | push @full_reports, "=== $title ===\n\n"; | |
148 | ||
149 | my $ml = _max( map { length $_->[0] } @reports ); | |
150 | my $wl = _max( map { length $_->[1] } @reports ); | |
151 | my $hl = _max( map { length $_->[2] } @reports ); | |
152 | ||
153 | if ($type eq 'modules') { | |
154 | splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; | |
155 | push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; | |
156 | } | |
157 | else { | |
158 | splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; | |
159 | push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; | |
160 | } | |
161 | ||
162 | push @full_reports, "\n"; | |
163 | } | |
164 | } | |
165 | } | |
166 | ||
167 | if ( @full_reports ) { | |
168 | diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; | |
169 | } | |
170 | ||
171 | if ( @dep_errors ) { | |
172 | diag join("\n", | |
173 | "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n", | |
174 | "The following REQUIRED prerequisites were not satisfied:\n", | |
175 | @dep_errors, | |
176 | "\n" | |
177 | ); | |
178 | } | |
179 | ||
180 | pass; | |
181 | ||
182 | # vim: ts=4 sts=4 sw=4 et: |
0 | use strict; | |
1 | use warnings; | |
2 | use Test::More 0.88; | |
3 | # This is a relatively nice way to avoid Test::NoWarnings breaking our | |
4 | # expectations by adding extra tests, without using no_plan. It also helps | |
5 | # avoid any other test module that feels introducing random tests, or even | |
6 | # test plans, is a nice idea. | |
7 | our $success = 0; | |
8 | END { $success && done_testing; } | |
9 | ||
10 | # List our own version used to generate this | |
11 | my $v = "\nGenerated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.10\n"; | |
12 | ||
13 | eval { # no excuses! | |
14 | # report our Perl details | |
15 | my $want = '5.008'; | |
16 | $v .= "perl: $] (wanted $want) on $^O from $^X\n\n"; | |
17 | }; | |
18 | defined($@) and diag("$@"); | |
19 | ||
20 | # Now, our module version dependencies: | |
21 | sub pmver { | |
22 | my ($module, $wanted) = @_; | |
23 | $wanted = " (want $wanted)"; | |
24 | my $pmver; | |
25 | eval "require $module;"; | |
26 | if ($@) { | |
27 | if ($@ =~ m/Can't locate .* in \@INC/) { | |
28 | $pmver = 'module not found.'; | |
29 | } else { | |
30 | diag("${module}: $@"); | |
31 | $pmver = 'died during require.'; | |
32 | } | |
33 | } else { | |
34 | my $version; | |
35 | eval { $version = $module->VERSION; }; | |
36 | if ($@) { | |
37 | diag("${module}: $@"); | |
38 | $pmver = 'died during VERSION check.'; | |
39 | } elsif (defined $version) { | |
40 | $pmver = "$version"; | |
41 | } else { | |
42 | $pmver = '<undef>'; | |
43 | } | |
44 | } | |
45 | ||
46 | # So, we should be good, right? | |
47 | return sprintf('%-45s => %-10s%-15s%s', $module, $pmver, $wanted, "\n"); | |
48 | } | |
49 | ||
50 | eval { $v .= pmver('Dist::Zilla::Role::FileFinderUser','any version') }; | |
51 | eval { $v .= pmver('Dist::Zilla::Role::FileMunger','any version') }; | |
52 | eval { $v .= pmver('ExtUtils::MakeMaker','6.30') }; | |
53 | eval { $v .= pmver('File::Spec','any version') }; | |
54 | eval { $v .= pmver('IO::Handle','any version') }; | |
55 | eval { $v .= pmver('IPC::Open3','any version') }; | |
56 | eval { $v .= pmver('Moose','any version') }; | |
57 | eval { $v .= pmver('MooseX::Types::Perl','any version') }; | |
58 | eval { $v .= pmver('PPI','any version') }; | |
59 | eval { $v .= pmver('Test::DZil','any version') }; | |
60 | eval { $v .= pmver('Test::More','0.88') }; | |
61 | eval { $v .= pmver('Test::Version','0.04') }; | |
62 | eval { $v .= pmver('namespace::autoclean','any version') }; | |
63 | eval { $v .= pmver('strict','any version') }; | |
64 | eval { $v .= pmver('warnings','any version') }; | |
65 | ||
66 | ||
67 | # All done. | |
68 | $v .= <<'EOT'; | |
69 | ||
70 | Thanks for using my code. I hope it works for you. | |
71 | If not, please try and include this output in the bug report. | |
72 | That will help me reproduce the issue and solve your problem. | |
73 | ||
74 | EOT | |
75 | ||
76 | diag($v); | |
77 | ok(1, "we really didn't test anything, just reporting data"); | |
78 | $success = 1; | |
79 | ||
80 | # Work around another nasty module on CPAN. :/ | |
81 | no warnings 'once'; | |
82 | $Template::Test::NO_FLUSH = 1; | |
83 | exit 0; |
3 | 3 | use Test::More; |
4 | 4 | use Test::DZil; |
5 | 5 | use Test::Version qw( version_ok ); |
6 | use Path::Class qw( dir ); | |
6 | 7 | |
7 | 8 | my $tzil = Builder->from_config({ dist_root => 'corpus/DZT' }); |
8 | 9 | |
9 | 10 | $tzil->build; |
10 | 11 | |
11 | version_ok( $tzil->tempdir->file('build/lib/DZT0.pm')); | |
12 | version_ok( $tzil->tempdir->file('build/lib/DZT1.pm')); | |
12 | version_ok( dir($tzil->tempdir)->file('build/lib/DZT0.pm')); | |
13 | version_ok( dir($tzil->tempdir)->file('build/lib/DZT1.pm')); | |
13 | 14 | |
14 | 15 | my $lib_0 = $tzil->slurp_file('build/lib/DZT0.pm'); |
15 | 16 | my $lib_1 = $tzil->slurp_file('build/lib/DZT1.pm'); |
3 | 3 | use Test::More; |
4 | 4 | use Test::DZil; |
5 | 5 | use Test::Version qw( version_ok ); |
6 | use Path::Class qw( dir ); | |
6 | 7 | |
7 | 8 | my $tzil = Builder->from_config({ dist_root => 'corpus/vDZT' }); |
8 | 9 | |
9 | 10 | $tzil->build; |
10 | 11 | |
11 | version_ok( $tzil->tempdir->file('build/lib/vDZT.pm')); | |
12 | version_ok( dir($tzil->tempdir)->file('build/lib/vDZT.pm')); | |
12 | 13 | |
13 | 14 | my $lib = $tzil->slurp_file('build/lib/vDZT.pm'); |
14 | 15 |
3 | 3 | use Test::More; |
4 | 4 | use Test::DZil; |
5 | 5 | use Test::Version qw( version_ok ); |
6 | use Path::Class qw( dir ); | |
6 | 7 | |
7 | 8 | $ENV{TRIAL} = 1; |
8 | 9 | |
10 | 11 | |
11 | 12 | $tzil->build; |
12 | 13 | |
13 | version_ok( $tzil->tempdir->file('build/lib/DZT0.pm')); | |
14 | version_ok( $tzil->tempdir->file('build/lib/DZT1.pm')); | |
14 | version_ok( dir($tzil->tempdir)->file('build/lib/DZT0.pm')); | |
15 | version_ok( dir($tzil->tempdir)->file('build/lib/DZT1.pm')); | |
15 | 16 | |
16 | 17 | my $lib_0 = $tzil->slurp_file('build/lib/DZT0.pm'); |
17 | 18 | my $lib_1 = $tzil->slurp_file('build/lib/DZT1.pm'); |
0 | ||
1 | BEGIN { | |
2 | unless ($ENV{AUTHOR_TESTING}) { | |
3 | require Test::More; | |
4 | Test::More::plan(skip_all => 'these tests are for testing by the author'); | |
5 | } | |
6 | } | |
7 | ||
8 | use strict; | |
9 | use warnings; | |
10 | ||
11 | # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.18 | |
12 | ||
13 | use Test::More 0.88; | |
14 | use Test::EOL; | |
15 | ||
16 | my @files = ( | |
17 | 'lib/Dist/Zilla/Plugin/OurPkgVersion.pm', | |
18 | 't/00-compile.t', | |
19 | 't/00-report-prereqs.dd', | |
20 | 't/00-report-prereqs.t', | |
21 | 't/01-basic.t', | |
22 | 't/02-vstring.t', | |
23 | 't/03-trial.t', | |
24 | 't/author-critic.t', | |
25 | 't/author-eol.t', | |
26 | 't/author-mojibake.t', | |
27 | 't/author-pod-coverage.t', | |
28 | 't/author-pod-spell.t', | |
29 | 't/author-pod-syntax.t', | |
30 | 't/author-test-version.t', | |
31 | 't/release-cpan-changes.t', | |
32 | 't/release-dist-manifest.t', | |
33 | 't/release-distmeta.t', | |
34 | 't/release-kwalitee.t', | |
35 | 't/release-meta-json.t', | |
36 | 't/release-minimum-version.t', | |
37 | 't/release-pod-linkcheck.t', | |
38 | 't/release-portability.t', | |
39 | 't/release-unused-vars.t' | |
40 | ); | |
41 | ||
42 | eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; | |
43 | done_testing; |
0 | #!perl | |
1 | ||
2 | BEGIN { | |
3 | unless ($ENV{AUTHOR_TESTING}) { | |
4 | require Test::More; | |
5 | Test::More::plan(skip_all => 'these tests are for testing by the author'); | |
6 | } | |
7 | } | |
8 | ||
9 | ||
10 | use strict; | |
11 | use warnings qw(all); | |
12 | ||
13 | use Test::More; | |
14 | use Test::Mojibake; | |
15 | ||
16 | all_files_encoding_ok(); |
0 | #!perl | |
1 | ||
2 | BEGIN { | |
3 | unless ($ENV{AUTHOR_TESTING}) { | |
4 | require Test::More; | |
5 | Test::More::plan(skip_all => 'these tests are for testing by the author'); | |
6 | } | |
7 | } | |
8 | ||
9 | # This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests. | |
10 | ||
11 | use Test::Pod::Coverage 1.08; | |
12 | use Pod::Coverage::TrustPod; | |
13 | ||
14 | all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); |
9 | 9 | use warnings; |
10 | 10 | use Test::More; |
11 | 11 | |
12 | # generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006001 | |
12 | # generated by Dist::Zilla::Plugin::Test::PodSpelling 2.007000 | |
13 | 13 | use Test::Spelling 0.12; |
14 | 14 | use Pod::Wordlist; |
15 | 15 | |
25 | 25 | Caleb |
26 | 26 | Cushing |
27 | 27 | xenoterracide |
28 | Grahan | |
29 | Ollis | |
30 | plicease | |
28 | 31 | Alexandr |
29 | 32 | Ciornii |
30 | 33 | alexchorny |
40 | 43 | David |
41 | 44 | Golden |
42 | 45 | dagolden |
46 | Graham | |
43 | 47 | lib |
44 | 48 | Dist |
45 | 49 | Zilla |
0 | #!perl | |
1 | ||
2 | BEGIN { | |
3 | unless ($ENV{AUTHOR_TESTING}) { | |
4 | require Test::More; | |
5 | Test::More::plan(skip_all => 'these tests are for testing by the author'); | |
6 | } | |
7 | } | |
8 | ||
9 | # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. | |
10 | use strict; use warnings; | |
11 | use Test::More; | |
12 | use Test::Pod 1.41; | |
13 | ||
14 | all_pod_files_ok(); |
0 | ||
1 | BEGIN { | |
2 | unless ($ENV{AUTHOR_TESTING}) { | |
3 | require Test::More; | |
4 | Test::More::plan(skip_all => 'these tests are for testing by the author'); | |
5 | } | |
6 | } | |
7 | ||
8 | use strict; | |
9 | use warnings; | |
10 | use Test::More; | |
11 | ||
12 | # generated by Dist::Zilla::Plugin::Test::EOL 0.08 | |
13 | use Test::EOL; | |
14 | ||
15 | all_perl_files_ok({ trailing_whitespace => 1 }); |
0 | ||
1 | BEGIN { | |
2 | unless ($ENV{AUTHOR_TESTING}) { | |
3 | require Test::More; | |
4 | Test::More::plan(skip_all => 'these tests are for testing by the author'); | |
5 | } | |
6 | } | |
7 | ||
8 | use strict; | |
9 | use warnings; | |
10 | use Test::More; | |
11 | ||
12 | # generated by Dist::Zilla::Plugin::Test::Version 1.05 | |
13 | use Test::Version; | |
14 | ||
15 | my @imports = qw( version_all_ok ); | |
16 | ||
17 | my $params = { | |
18 | is_strict => 0, | |
19 | has_version => 1, | |
20 | multiple => 0, | |
21 | ||
22 | }; | |
23 | ||
24 | push @imports, $params | |
25 | if version->parse( $Test::Version::VERSION ) >= version->parse('1.002'); | |
26 | ||
27 | ||
28 | Test::Version->import(@imports); | |
29 | ||
30 | version_all_ok; | |
31 | done_testing; |
6 | 6 | } |
7 | 7 | } |
8 | 8 | |
9 | # This file was automatically generated by Dist::Zilla::Plugin::MetaTests. | |
9 | 10 | |
10 | use Test::More; | |
11 | use Test::CPAN::Meta; | |
11 | 12 | |
12 | eval "use Test::CPAN::Meta"; | |
13 | plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@; | |
14 | 13 | meta_yaml_ok(); |
5 | 5 | } |
6 | 6 | } |
7 | 7 | |
8 | # this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.07 | |
8 | # this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.12 | |
9 | 9 | use strict; |
10 | 10 | use warnings; |
11 | use Test::Kwalitee; | |
11 | use Test::More 0.88; | |
12 | use Test::Kwalitee 1.21 'kwalitee_ok'; | |
13 | ||
14 | kwalitee_ok(); | |
15 | ||
16 | done_testing; |
7 | 7 | } |
8 | 8 | |
9 | 9 | |
10 | use Test::More; | |
11 | eval 'use Test::CPAN::Meta::JSON'; | |
12 | plan skip_all => 'Test::CPAN::Meta::JSON required for testing META.json' if $@; | |
10 | use Test::CPAN::Meta::JSON; | |
13 | 11 | meta_json_ok(); |
0 | #!perl | |
1 | ||
2 | BEGIN { | |
3 | unless ($ENV{RELEASE_TESTING}) { | |
4 | require Test::More; | |
5 | Test::More::plan(skip_all => 'these tests are for release candidate testing'); | |
6 | } | |
7 | } | |
8 | ||
9 | ||
10 | use strict; | |
11 | use warnings qw(all); | |
12 | ||
13 | use Test::More; | |
14 | ||
15 | ## no critic (ProhibitStringyEval, RequireCheckingReturnValueOfEval) | |
16 | eval q(use Test::Mojibake); | |
17 | plan skip_all => q(Test::Mojibake required for source encoding testing) if $@; | |
18 | ||
19 | all_files_encoding_ok(); |
0 | #!perl | |
1 | ||
2 | BEGIN { | |
3 | unless ($ENV{RELEASE_TESTING}) { | |
4 | require Test::More; | |
5 | Test::More::plan(skip_all => 'these tests are for release candidate testing'); | |
6 | } | |
7 | } | |
8 | ||
9 | ||
10 | use Test::More; | |
11 | ||
12 | eval "use Test::Pod::Coverage 1.08"; | |
13 | plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage" | |
14 | if $@; | |
15 | ||
16 | eval "use Pod::Coverage::TrustPod"; | |
17 | plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage" | |
18 | if $@; | |
19 | ||
20 | all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); |
0 | #!perl | |
1 | ||
2 | BEGIN { | |
3 | unless ($ENV{RELEASE_TESTING}) { | |
4 | require Test::More; | |
5 | Test::More::plan(skip_all => 'these tests are for release candidate testing'); | |
6 | } | |
7 | } | |
8 | ||
9 | use Test::More; | |
10 | ||
11 | eval "use Test::Pod 1.41"; | |
12 | plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; | |
13 | ||
14 | all_pod_files_ok(); |
15 | 15 | eval 'use Test::Portability::Files'; |
16 | 16 | plan skip_all => 'Test::Portability::Files required for testing portability' |
17 | 17 | if $@; |
18 | ||
18 | 19 | run_tests(); |
0 | ||
1 | BEGIN { | |
2 | unless ($ENV{RELEASE_TESTING}) { | |
3 | require Test::More; | |
4 | Test::More::plan(skip_all => 'these tests are for release candidate testing'); | |
5 | } | |
6 | } | |
7 | ||
8 | use strict; | |
9 | use warnings; | |
10 | use Test::More; | |
11 | ||
12 | # generated by Dist::Zilla::Plugin::Test::Version 0.002004 | |
13 | BEGIN { eval "use Test::Version; 1;" or die $@; } | |
14 | ||
15 | my @imports = ( 'version_all_ok' ); | |
16 | ||
17 | my $params = { | |
18 | is_strict => 0, | |
19 | has_version => 1, | |
20 | }; | |
21 | ||
22 | push @imports, $params | |
23 | if version->parse( $Test::Version::VERSION ) >= version->parse('1.002'); | |
24 | ||
25 | ||
26 | Test::Version->import(@imports); | |
27 | ||
28 | version_all_ok; | |
29 | done_testing; |
7 | 7 | } |
8 | 8 | |
9 | 9 | |
10 | use Test::More; | |
10 | use Test::More 0.96 tests => 1; | |
11 | eval { require Test::Vars }; | |
11 | 12 | |
12 | eval "use Test::Vars"; | |
13 | plan skip_all => "Test::Vars required for testing unused vars" | |
14 | if $@; | |
13 | SKIP: { | |
14 | skip 1 => 'Test::Vars required for testing for unused vars' | |
15 | if $@; | |
16 | Test::Vars->import; | |
17 | ||
18 | subtest 'unused vars' => sub { | |
15 | 19 | all_vars_ok(); |
20 | }; | |
21 | }; |