Codebase list libdist-zilla-role-bootstrap-perl / 4bfb766
Import upstream version 1.001004+git20170303.1.c802df2 Debian Janitor 2 years ago
27 changed file(s) with 455 addition(s) and 1745 deletion(s). Raw diff Collapse all Expand all
+0
-11
.gitignore less more
0 /.build
1 /tmp/
2 /Dist-Zilla-Role-Bootstrap-*
3 /MYMETA.json
4 /MYMETA.yml
5 /META.json
6 /META.yml
7 /Makefile
8 /Makefile.old
9 /blib/
10 /pm_to_blib
+0
-58
.travis.yml less more
0 ---
1 after_failure:
2 - perl ./maint-travis-ci/report_fail_ctx.pl
3 before_install:
4 - perlbrew list
5 - time git clone --depth 10 https://github.com/kentfredric/travis-scripts.git maint-travis-ci
6 - time git -C ./maint-travis-ci reset --hard master
7 - time perl ./maint-travis-ci/branch_reset.pl
8 - time perl ./maint-travis-ci/sterilize_env.pl
9 before_script:
10 - time perl ./maint-travis-ci/before_script.pl
11 branches:
12 only:
13 - master
14 - builds
15 - releases
16 install:
17 - time perl ./maint-travis-ci/install_deps_early.pl
18 - time perl ./maint-travis-ci/autoinstall_dzil.pl
19 - time perl ./maint-travis-ci/install_deps_2.pl
20 language: perl
21 matrix:
22 allow_failures:
23 - perl: '5.8'
24 - env: STERILIZE_ENV=0 RELEASE_TESTING=1 AUTHOR_TESTING=1
25 - env: STERILIZE_ENV=0 DEVELOPER_DEPS=1
26 include:
27 - env: STERILIZE_ENV=0 COVERAGE_TESTING=1
28 perl: '5.21'
29 - env: STERILIZE_ENV=1
30 perl: '5.21'
31 - env: STERILIZE_ENV=0
32 perl: '5.8'
33 - env: STERILIZE_ENV=0
34 perl: '5.10'
35 - env: STERILIZE_ENV=0
36 perl: '5.12'
37 - env: STERILIZE_ENV=0
38 perl: '5.14'
39 - env: STERILIZE_ENV=0
40 perl: '5.16'
41 - env: STERILIZE_ENV=0
42 perl: '5.20'
43 - env: STERILIZE_ENV=0
44 perl: '5.21'
45 - env: STERILIZE_ENV=1
46 perl: '5.8'
47 - env: STERILIZE_ENV=1
48 perl: '5.10'
49 - env: STERILIZE_ENV=1
50 perl: '5.20'
51 - env: STERILIZE_ENV=0 DEVELOPER_DEPS=1
52 perl: '5.21'
53 - env: STERILIZE_ENV=0 RELEASE_TESTING=1 AUTHOR_TESTING=1
54 perl: '5.21'
55 script:
56 - time perl ./maint-travis-ci/script.pl
57 sudo: false
0
1 =encoding UTF-8
2
3 =head1 CONTENTS
4
5 =over 4
6
7 =item * L</HOW TO CONTRIBUTE>
8
9 =over 4
10
11 =item * L</Getting dependencies>
12
13 =item * L</Running tests>
14
15 =item * L</Code style and tidying>
16
17 =item * L</Patching documentation>
18
19 =item * L</Installing and using Dist::Zilla>
20
21 =back
22
23 =item * L</OTHER SHORTCUTS>
24
25 =over 4
26
27 =item * L</Install and Test using a pre-made build branch>
28
29 =item * L<< Locally Patch C<dist.ini> >>
30
31 =over 4
32
33 =item * L<< /Doing Long-Term C<dist.ini> patches >>
34
35 =back
36
37 =back
38
39 =item * L</CREDITS>
40
41 =back
42
43 =head1 HOW TO CONTRIBUTE
44
45 Thank you for considering contributing to this distribution. This file
46 contains instructions that will help you work with the source code.
47
48 The distribution is managed with Dist::Zilla. This means than many of the
49 usual files you might expect are not in the repository, but are generated at
50 release time, as is much of the documentation. Some generated files are
51 kept in the repository as a convenience (e.g. Makefile.PL or cpanfile).
52
53 Generally, B<you do not need Dist::Zilla to contribute patches>. You may need
54 Dist::Zilla to create a tarball. See below for guidance.
55
56 =head2 Getting dependencies
57
58 If you have App::cpanminus 1.6 or later installed, you can use C<cpanm> to
59 satisfy dependencies like this:
60
61 $ cpanm --installdeps .
62
63 Otherwise, look for either a C<Makefile.PL> or C<cpanfile> file for
64 a list of dependencies to satisfy.
65
66 =head2 Running tests
67
68 You can run tests directly using the `prove` tool:
69
70 $ prove -l
71 $ prove -lv t/some_test_file.t
72
73 For most of my distributions, `prove` is entirely sufficient for you to test any
74 patches you have. I use `prove` for 99% of my testing during development.
75
76 =head2 Code style and tidying
77
78 Please try to match any existing coding style. If there is a C<.perltidyrc>
79 file, please install Perl::Tidy and use perltidy before submitting patches.
80
81 =head2 Patching documentation
82
83 Much of the documentation Pod is generated at release time. Some is
84 generated boilerplate; other documentation is built from pseudo-POD
85 directives in the source like C<=method> or C<=func>.
86
87 If you would like to submit a documentation edit, please limit yourself to
88 the documentation you see.
89
90 If you see typos or documentation issues in the generated docs, please
91 email or open a bug ticket instead of patching.
92
93 =head2 Installing and using Dist::Zilla
94
95 Dist::Zilla is a very powerful authoring tool, optimized for maintaining a
96 large number of distributions with a high degree of automation, but it has a
97 large dependency chain, a bit of a learning curve and requires a number of
98 author-specific plugins.
99
100 To install it from CPAN, I recommend one of the following approaches for
101 the quickest installation:
102
103 # using CPAN.pm, but bypassing non-functional pod tests
104 $ cpan TAP::Harness::Restricted
105 $ PERL_MM_USE_DEFAULT=1 HARNESS_CLASS=TAP::Harness::Restricted cpan Dist::Zilla
106
107 # using cpanm, bypassing *all* tests
108 $ cpanm -n Dist::Zilla
109
110 In either case, it's probably going to take about 10 minutes. Go for a walk,
111 go get a cup of your favorite beverage, take a bathroom break, or whatever.
112 When you get back, Dist::Zilla should be ready for you.
113
114 Then you need to install any plugins specific to this distribution:
115
116 $ cpan `dzil authordeps`
117 $ dzil authordeps | cpanm
118
119 Once installed, here are some dzil commands you might try:
120
121 $ dzil build
122 $ dzil test
123 $ dzil xtest
124
125 You can learn more about Dist::Zilla at http://dzil.org/
126
127 =head1 OTHER SHORTCUTS
128
129 I use a few other tricks that might prove useful to know about when hacking
130 on my dists.
131
132 =head2 Install and Test using a pre-made build branch
133
134 Most of my repositories come with 1 or more pre-made C<build> branches, which may
135 occur under any of the following names:
136
137 =over 4
138
139 =item * C<builds> - my last C<dzil build>
140
141 =item * C<releases> - the build generated for the most recent CPAN release
142
143 =item * C<build/master> ( I<legacy> version of C<builds> )
144
145 =back
146
147 These branches contain committed copies of my own local C<dzil build> invocations.
148
149 Checking out a copy of these branches with
150
151 git checkout builds
152
153 Will get you a full working built tree, which will look identical to how the distribution
154 will look once I ship it.
155
156 Having this is not entirely necessary as you should be able to do similar simply working
157 on the master branch ( with a few caveats around POD handling )
158
159 But its there if you need it.
160
161 Additionally: These branches are part of my Travis testing infrastructure which help
162 ascertain that the module will work and pass tests without the benefit of having
163 3-halves of CPAN due to developer dependencies.
164
165 =head2 Locally Patch C<dist.ini>
166
167 The majority of C<Dist::Zilla> authors ship around a load of shared configuration
168 in a personal C<@Bundle>, which makes replicating configuration to their different
169 distributions simpler.
170
171 This has a downside that every time they make a minor tweak to their bundle, everywhere
172 that was currently using that bundle gets the changes, and not all those changes will
173 necessarily work with their code.
174
175 The bundle system also makes it tricky for people to simply patch-out single plugins
176 that are causing local problems for them because they're hidden behind the bundle façade.
177
178 Here, I use a system from generating a frozen snapshot of the state of my bundle:
179 C<dist.ini> is a flattened unbundled version of C<dist.ini.meta>
180
181 As such, you can tell B<exactly> which plugins are being consumed simply by looking at
182 C<dist.ini>. And you can tell B<exactly> what their configuration is and their intended
183 order is.
184
185 So if you're hacking on one of my dists and a plugin or two get in your way and you're
186 I<wanting> to work with the full C<Dist::Zilla> stack, you can freely just yank them out
187 and keep on trucking without having to memorize the arcane syntax my bundle requires.
188
189 =head3 Doing Long-Term C<dist.ini> patches
190
191 If you find yourself wanting to make and submit long term changes to dist.ini, B<then>
192 you I<may> want to look into C<dist.ini.meta>, and see the results of your changes
193 in C<dist.ini> after making changes by performing:
194
195 dzil bakeini
196
197 This will possibly require installing the following, which are not strictly required for
198 building my dists:
199
200 Dist::Zilla::PluginBundle::Author::KENTNL
201 Dist::Zilla::App::Command::bakeini
202
203 =head1 CREDITS
204
205 This file was adapted from an initial C<CONTRIBUTING.mkdn> file from David Golden under the terms of the Apache 2 license.
00 Release history for Dist-Zilla-Role-Bootstrap
1
2 {{$NEXT}}
13
24 1.001004 2017-03-03T07:00:55Z 934c2a5
35 [Bugfix]
0 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.008.
1 .gitignore
20 .mailmap
31 .perltidyrc
4 .travis.yml
52 Changes
6 INSTALL.SKIP
7 LICENSE
8 MANIFEST
9 META.json
10 META.yml
11 Makefile.PL
12 README
3 CONTRIBUTING.pod
134 corpus/fake_dist_01/lib/E.pm
145 corpus/fake_dist_01/t/placeholder.txt
6 Dist-Zilla-Role-Bootstrap-1.001005/META.json
7 Dist-Zilla-Role-Bootstrap-1.001005/META.yml
158 dist.ini
169 dist.ini.meta
10 INSTALL.SKIP
1711 lib/Dist/Zilla/Role/Bootstrap.pm
12 LICENSE
1813 maint/perlcritic.rc.gen.pl
14 Makefile.PL
15 MANIFEST This list of files
1916 misc/Changes.deps
2017 misc/Changes.deps.all
2118 misc/Changes.deps.dev
2219 misc/Changes.deps.opt
23 misc/built_with.json
2420 misc/perlcritic.deps
2521 perlcritic.rc
26 t/00-compile/lib_Dist_Zilla_Role_Bootstrap_pm.t
27 t/00-report-prereqs.dd
28 t/00-report-prereqs.t
22 README.mkdn
2923 t/01-basic.t
3024 t/02-try-built-mtime.t
3125 t/03-try-built-parseversion.t
3226 weaver.ini
33 xt/author/critic.t
34 xt/author/eol.t
35 xt/author/pod-coverage.t
36 xt/author/pod-syntax.t
37 xt/release/cpan-changes.t
38 xt/release/distmeta.t
39 xt/release/kwalitee.t
40 xt/release/minimum-version.t
27 META.yml Module YAML meta-data (added by MakeMaker)
28 META.json Module JSON meta-data (added by MakeMaker)
22 "author" : [
33 "Kent Fredric <kentnl@cpan.org>"
44 ],
5 "dynamic_config" : 0,
6 "generated_by" : "Dist::Zilla version 6.008, CPAN::Meta::Converter version 2.150010",
5 "dynamic_config" : 1,
6 "generated_by" : "ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010",
77 "license" : [
88 "perl_5"
99 ],
1212 "version" : 2
1313 },
1414 "name" : "Dist-Zilla-Role-Bootstrap",
15 "no_index" : {
16 "directory" : [
17 "t",
18 "inc"
19 ]
20 },
1521 "prereqs" : {
16 "configure" : {
17 "recommends" : {
18 "ExtUtils::MakeMaker" : "7.00"
19 },
22 "build" : {
2023 "requires" : {
21 "ExtUtils::MakeMaker" : "0",
22 "perl" : "5.006"
24 "ExtUtils::MakeMaker" : "0"
2325 }
2426 },
25 "develop" : {
26 "recommends" : {
27 "Test::More" : "0.99"
28 },
27 "configure" : {
2928 "requires" : {
30 "Dist::Zilla" : "5",
31 "Dist::Zilla::Plugin::Author::KENTNL::CONTRIBUTING" : "0.001003",
32 "Dist::Zilla::Plugin::Author::KENTNL::RecommendFixes" : "0.004002",
33 "Dist::Zilla::Plugin::Author::KENTNL::TravisCI" : "0.001002",
34 "Dist::Zilla::Plugin::Authority" : "1.006",
35 "Dist::Zilla::Plugin::AutoPrereqs" : "0",
36 "Dist::Zilla::Plugin::BumpVersionAfterRelease" : "0",
37 "Dist::Zilla::Plugin::ConfirmRelease" : "0",
38 "Dist::Zilla::Plugin::CopyFilesFromBuild" : "0",
39 "Dist::Zilla::Plugin::Git::Check" : "0",
40 "Dist::Zilla::Plugin::Git::Commit" : "0",
41 "Dist::Zilla::Plugin::Git::CommitBuild" : "0",
42 "Dist::Zilla::Plugin::Git::Contributors" : "0.006",
43 "Dist::Zilla::Plugin::Git::GatherDir" : "0",
44 "Dist::Zilla::Plugin::Git::NextRelease" : "0.004000",
45 "Dist::Zilla::Plugin::Git::Tag" : "0",
46 "Dist::Zilla::Plugin::GithubMeta" : "0",
47 "Dist::Zilla::Plugin::License" : "0",
48 "Dist::Zilla::Plugin::MakeMaker" : "0",
49 "Dist::Zilla::Plugin::Manifest" : "0",
50 "Dist::Zilla::Plugin::ManifestSkip" : "0",
51 "Dist::Zilla::Plugin::MetaConfig" : "0",
52 "Dist::Zilla::Plugin::MetaData::BuiltWith" : "1.004000",
53 "Dist::Zilla::Plugin::MetaJSON" : "0",
54 "Dist::Zilla::Plugin::MetaProvides::Package" : "1.14000001",
55 "Dist::Zilla::Plugin::MetaTests" : "0",
56 "Dist::Zilla::Plugin::MetaYAML::Minimal" : "0",
57 "Dist::Zilla::Plugin::MinimumPerl" : "0",
58 "Dist::Zilla::Plugin::PodCoverageTests" : "0",
59 "Dist::Zilla::Plugin::PodSyntaxTests" : "0",
60 "Dist::Zilla::Plugin::PodWeaver" : "0",
61 "Dist::Zilla::Plugin::Prereqs" : "0",
62 "Dist::Zilla::Plugin::Prereqs::AuthorDeps" : "0",
63 "Dist::Zilla::Plugin::Prereqs::Recommend::MatchInstalled" : "0",
64 "Dist::Zilla::Plugin::Prereqs::Upgrade" : "0",
65 "Dist::Zilla::Plugin::Readme::Brief" : "0",
66 "Dist::Zilla::Plugin::ReadmeAnyFromPod" : "0",
67 "Dist::Zilla::Plugin::RemovePrereqs::Provided" : "0",
68 "Dist::Zilla::Plugin::RewriteVersion::Sanitized" : "0",
69 "Dist::Zilla::Plugin::RunExtraTests" : "0",
70 "Dist::Zilla::Plugin::Test::CPAN::Changes" : "0",
71 "Dist::Zilla::Plugin::Test::Compile::PerFile" : "0.003902",
72 "Dist::Zilla::Plugin::Test::EOL" : "0",
73 "Dist::Zilla::Plugin::Test::Kwalitee" : "0",
74 "Dist::Zilla::Plugin::Test::MinimumVersion" : "0",
75 "Dist::Zilla::Plugin::Test::Perl::Critic" : "0",
76 "Dist::Zilla::Plugin::Test::ReportPrereqs" : "0",
77 "Dist::Zilla::Plugin::TestRelease" : "0",
78 "Dist::Zilla::Plugin::Twitter" : "0",
79 "Dist::Zilla::Plugin::UploadToCPAN" : "0",
80 "English" : "0",
81 "Pod::Coverage::TrustPod" : "0",
82 "Software::License::Perl_5" : "0",
83 "Test::CPAN::Changes" : "0.19",
84 "Test::CPAN::Meta" : "0",
85 "Test::EOL" : "0",
86 "Test::Kwalitee" : "1.21",
87 "Test::MinimumVersion" : "0",
88 "Test::More" : "0.96",
89 "Test::Pod" : "1.41",
90 "Test::Pod::Coverage" : "1.08"
91 },
92 "suggests" : {
93 "Dist::Zilla::App::Command::bakeini" : "0.002005",
94 "Dist::Zilla::PluginBundle::Author::KENTNL" : "2.025020"
29 "ExtUtils::MakeMaker" : "0"
9530 }
9631 },
9732 "runtime" : {
98 "recommends" : {
99 "Path::Tiny" : "0.058"
100 },
10133 "requires" : {
10234 "Carp" : "0",
10335 "Dist::Zilla::Role::Plugin" : "0",
11244 }
11345 },
11446 "test" : {
115 "recommends" : {
116 "CPAN::Meta" : "2.120900",
117 "ExtUtils::MakeMaker" : "7.00",
118 "Moose" : "2.000",
119 "Test::More" : "0.99"
120 },
12147 "requires" : {
12248 "Dist::Zilla::Chrome::Test" : "0",
12349 "Dist::Zilla::Dist::Builder" : "0",
12854 "File::Spec" : "0",
12955 "FindBin" : "0",
13056 "Moose" : "0",
131 "Test::More" : "0",
132 "perl" : "5.006"
57 "Test::More" : "0"
13358 }
13459 }
13560 },
136 "provides" : {
137 "Dist::Zilla::Role::Bootstrap" : {
138 "file" : "lib/Dist/Zilla/Role/Bootstrap.pm",
139 "version" : "1.001004"
140 }
141 },
14261 "release_status" : "stable",
143 "resources" : {
144 "bugtracker" : {
145 "web" : "https://github.com/kentnl/Dist-Zilla-Role-Bootstrap/issues"
146 },
147 "homepage" : "https://github.com/kentnl/Dist-Zilla-Role-Bootstrap",
148 "repository" : {
149 "type" : "git",
150 "url" : "https://github.com/kentnl/Dist-Zilla-Role-Bootstrap.git",
151 "web" : "https://github.com/kentnl/Dist-Zilla-Role-Bootstrap"
152 }
153 },
154 "version" : "1.001004",
155 "x_BuiltWith" : {
156 "external_file" : "misc/built_with.json"
157 },
158 "x_Dist_Zilla" : {
159 "perl" : {
160 "version" : "5.025010"
161 },
162 "plugins" : [
163 {
164 "class" : "Dist::Zilla::Plugin::MetaConfig",
165 "name" : "@Author::KENTNL/MetaConfig",
166 "version" : "6.008"
167 },
168 {
169 "class" : "Dist::Zilla::Plugin::GithubMeta",
170 "name" : "@Author::KENTNL/GithubMeta",
171 "version" : "0.54"
172 },
173 {
174 "class" : "Dist::Zilla::Plugin::MetaProvides::Package",
175 "config" : {
176 "Dist::Zilla::Plugin::MetaProvides::Package" : {
177 "finder_objects" : [
178 {
179 "class" : "Dist::Zilla::Plugin::FinderCode",
180 "name" : "@Author::KENTNL/MetaProvides::Package/AUTOVIV/:InstallModulesPM",
181 "version" : "6.008"
182 }
183 ],
184 "include_underscores" : 0
185 },
186 "Dist::Zilla::Role::MetaProvider::Provider" : {
187 "$Dist::Zilla::Role::MetaProvider::Provider::VERSION" : "2.002004",
188 "inherit_missing" : 1,
189 "inherit_version" : 1,
190 "meta_noindex" : 1
191 },
192 "Dist::Zilla::Role::ModuleMetadata" : {
193 "Module::Metadata" : "1.000033",
194 "version" : "0.004"
195 }
196 },
197 "name" : "@Author::KENTNL/MetaProvides::Package",
198 "version" : "2.004003"
199 },
200 {
201 "class" : "Dist::Zilla::Plugin::MetaData::BuiltWith",
202 "config" : {
203 "Dist::Zilla::Plugin::MetaData::BuiltWith" : {
204 "$Module::Metadata::VERSION" : "1.000033",
205 "_stash_key" : "x_BuiltWith",
206 "external_file_name" : "misc/built_with.json",
207 "show_config" : "1",
208 "show_uname" : "1",
209 "uname" : {
210 "uname_args" : [
211 "-s",
212 "-o",
213 "-r",
214 "-m",
215 "-i"
216 ],
217 "uname_call" : "uname"
218 },
219 "use_external_file" : "only"
220 }
221 },
222 "name" : "@Author::KENTNL/MetaData::BuiltWith",
223 "version" : "1.004005"
224 },
225 {
226 "class" : "Dist::Zilla::Plugin::Git::Contributors",
227 "config" : {
228 "Dist::Zilla::Plugin::Git::Contributors" : {
229 "git --version" : "2.11.1",
230 "include_authors" : 0,
231 "include_releaser" : 0,
232 "order_by" : "name",
233 "paths" : []
234 }
235 },
236 "name" : "@Author::KENTNL/Git::Contributors",
237 "version" : "0.029"
238 },
239 {
240 "class" : "Dist::Zilla::Plugin::Git::GatherDir",
241 "config" : {
242 "Dist::Zilla::Plugin::GatherDir" : {
243 "exclude_filename" : [
244 "CONTRIBUTING.pod",
245 "LICENSE",
246 "Makefile.PL",
247 "README",
248 "README.mkdn",
249 "README.pod"
250 ],
251 "exclude_match" : [],
252 "follow_symlinks" : 0,
253 "include_dotfiles" : 1,
254 "prefix" : "",
255 "prune_directory" : [],
256 "root" : "."
257 },
258 "Dist::Zilla::Plugin::Git::GatherDir" : {
259 "include_untracked" : 0
260 }
261 },
262 "name" : "@Author::KENTNL/Git::GatherDir",
263 "version" : "2.041"
264 },
265 {
266 "class" : "Dist::Zilla::Plugin::License",
267 "name" : "@Author::KENTNL/License",
268 "version" : "6.008"
269 },
270 {
271 "class" : "Dist::Zilla::Plugin::MetaJSON",
272 "name" : "@Author::KENTNL/MetaJSON",
273 "version" : "6.008"
274 },
275 {
276 "class" : "Dist::Zilla::Plugin::MetaYAML::Minimal",
277 "config" : {
278 "Dist::Zilla::Plugin::MetaYAML::Minimal" : {
279 "filename" : "META.yml",
280 "version" : "1.4"
281 }
282 },
283 "name" : "@Author::KENTNL/MetaYAML::Minimal",
284 "version" : "0.001000"
285 },
286 {
287 "class" : "Dist::Zilla::Plugin::Manifest",
288 "name" : "@Author::KENTNL/Manifest",
289 "version" : "6.008"
290 },
291 {
292 "class" : "Dist::Zilla::Plugin::Author::KENTNL::TravisCI",
293 "config" : {
294 "Dist::Zilla::Plugin::Author::KENTNL::TravisCI" : {
295 "fail_perls" : [
296 "5.8"
297 ],
298 "skip_perls" : []
299 }
300 },
301 "name" : "@Author::KENTNL/Author::KENTNL::TravisCI",
302 "version" : "0.001003"
303 },
304 {
305 "class" : "Dist::Zilla::Plugin::Author::KENTNL::CONTRIBUTING",
306 "config" : {
307 "Dist::Zilla::Plugin::Author::KENTNL::CONTRIBUTING" : {
308 "document_version" : "0.1"
309 },
310 "Dist::Zilla::Plugin::GenerateFile::FromShareDir" : {
311 "destination_filename" : "CONTRIBUTING.pod",
312 "dist" : "Dist-Zilla-Plugin-Author-KENTNL-CONTRIBUTING",
313 "encoding" : "UTF-8",
314 "location" : "root",
315 "phase" : "build",
316 "source_filename" : "contributing-0.1.pod",
317 "version" : "0.013"
318 },
319 "Dist::Zilla::Role::RepoFileInjector" : {
320 "allow_overwrite" : 1,
321 "repo_root" : ".",
322 "version" : "0.007"
323 }
324 },
325 "name" : "@Author::KENTNL/Author::KENTNL::CONTRIBUTING",
326 "version" : "0.001005"
327 },
328 {
329 "class" : "Dist::Zilla::Plugin::CopyFilesFromBuild",
330 "name" : "@Author::KENTNL/CopyXBuild",
331 "version" : "0.163040"
332 },
333 {
334 "class" : "Dist::Zilla::Plugin::MetaTests",
335 "name" : "@Author::KENTNL/MetaTests",
336 "version" : "6.008"
337 },
338 {
339 "class" : "Dist::Zilla::Plugin::PodCoverageTests",
340 "name" : "@Author::KENTNL/PodCoverageTests",
341 "version" : "6.008"
342 },
343 {
344 "class" : "Dist::Zilla::Plugin::PodSyntaxTests",
345 "name" : "@Author::KENTNL/PodSyntaxTests",
346 "version" : "6.008"
347 },
348 {
349 "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs",
350 "name" : "@Author::KENTNL/Test::ReportPrereqs",
351 "version" : "0.025"
352 },
353 {
354 "class" : "Dist::Zilla::Plugin::Test::Kwalitee",
355 "config" : {
356 "Dist::Zilla::Plugin::Test::Kwalitee" : {
357 "filename" : "xt/release/kwalitee.t",
358 "skiptest" : []
359 }
360 },
361 "name" : "@Author::KENTNL/Test::Kwalitee",
362 "version" : "2.12"
363 },
364 {
365 "class" : "Dist::Zilla::Plugin::Test::EOL",
366 "config" : {
367 "Dist::Zilla::Plugin::Test::EOL" : {
368 "filename" : "xt/author/eol.t",
369 "finder" : [
370 ":ExecFiles",
371 ":InstallModules",
372 ":TestFiles"
373 ],
374 "trailing_whitespace" : 1
375 }
376 },
377 "name" : "@Author::KENTNL/Test::EOL",
378 "version" : "0.19"
379 },
380 {
381 "class" : "Dist::Zilla::Plugin::Test::MinimumVersion",
382 "name" : "@Author::KENTNL/Test::MinimumVersion",
383 "version" : "2.000007"
384 },
385 {
386 "class" : "Dist::Zilla::Plugin::FinderCode",
387 "name" : "@Author::KENTNL/Test::Compile::PerFile/AUTOVIV/:InstallModulesPM",
388 "version" : "6.008"
389 },
390 {
391 "class" : "Dist::Zilla::Plugin::Test::Compile::PerFile",
392 "config" : {
393 "Dist::Zilla::Plugin::Test::Compile::PerFile" : {
394 "file" : [
395 "lib/Dist/Zilla/Role/Bootstrap.pm"
396 ],
397 "path_translator" : "base64_filter",
398 "prefix" : "t/00-compile",
399 "skip" : [],
400 "test_template" : "02-raw-require.t.tpl",
401 "xt_mode" : null
402 }
403 },
404 "name" : "@Author::KENTNL/Test::Compile::PerFile",
405 "version" : "0.004000"
406 },
407 {
408 "class" : "Dist::Zilla::Plugin::Test::Perl::Critic",
409 "name" : "@Author::KENTNL/Test::Perl::Critic",
410 "version" : "3.000"
411 },
412 {
413 "class" : "Dist::Zilla::Plugin::ManifestSkip",
414 "name" : "@Author::KENTNL/ManifestSkip",
415 "version" : "6.008"
416 },
417 {
418 "class" : "Dist::Zilla::Plugin::RewriteVersion::Sanitized",
419 "config" : {
420 "Dist::Zilla::Plugin::RewriteVersion" : {
421 "add_tarball_name" : 0,
422 "finders" : [
423 ":ExecFiles",
424 ":InstallModules"
425 ],
426 "global" : 0,
427 "skip_version_provider" : 0
428 },
429 "Dist::Zilla::Role::Version::Sanitize" : {
430 "$Dist::Zilla::Role::Version::Sanitize::VERSION" : "0.002002",
431 "mantissa" : "6",
432 "normal_form" : "numify"
433 }
434 },
435 "name" : "@Author::KENTNL/RewriteVersion::Sanitized",
436 "version" : "0.001005"
437 },
438 {
439 "class" : "Dist::Zilla::Plugin::PodWeaver",
440 "config" : {
441 "Dist::Zilla::Plugin::PodWeaver" : {
442 "finder" : [
443 ":InstallModules",
444 ":ExecFiles"
445 ],
446 "plugins" : [
447 {
448 "class" : "Pod::Weaver::Plugin::EnsurePod5",
449 "name" : "@CorePrep/EnsurePod5",
450 "version" : "4.015"
451 },
452 {
453 "class" : "Pod::Weaver::Plugin::H1Nester",
454 "name" : "@CorePrep/H1Nester",
455 "version" : "4.015"
456 },
457 {
458 "class" : "Pod::Weaver::Plugin::SingleEncoding",
459 "name" : "-SingleEncoding",
460 "version" : "4.015"
461 },
462 {
463 "class" : "Pod::Weaver::Section::Name",
464 "name" : "Name",
465 "version" : "4.015"
466 },
467 {
468 "class" : "Pod::Weaver::Section::Version",
469 "name" : "Version",
470 "version" : "4.015"
471 },
472 {
473 "class" : "Pod::Weaver::Section::Region",
474 "name" : "prelude",
475 "version" : "4.015"
476 },
477 {
478 "class" : "Pod::Weaver::Section::Generic",
479 "name" : "SYNOPSIS",
480 "version" : "4.015"
481 },
482 {
483 "class" : "Pod::Weaver::Section::Generic",
484 "name" : "DESCRIPTION",
485 "version" : "4.015"
486 },
487 {
488 "class" : "Pod::Weaver::Section::Generic",
489 "name" : "OVERVIEW",
490 "version" : "4.015"
491 },
492 {
493 "class" : "Pod::Weaver::Section::Collect",
494 "name" : "REQUIRES",
495 "version" : "4.015"
496 },
497 {
498 "class" : "Pod::Weaver::Section::Collect",
499 "name" : "METHODS",
500 "version" : "4.015"
501 },
502 {
503 "class" : "Pod::Weaver::Section::Collect",
504 "name" : "ATTRIBUTES",
505 "version" : "4.015"
506 },
507 {
508 "class" : "Pod::Weaver::Section::Collect",
509 "name" : "PRIVATE_ATTRIBUTES",
510 "version" : "4.015"
511 },
512 {
513 "class" : "Pod::Weaver::Section::Collect",
514 "name" : "PRIVATE_METHODS",
515 "version" : "4.015"
516 },
517 {
518 "class" : "Pod::Weaver::Section::Collect",
519 "name" : "PRIVATE_FUNCTIONS",
520 "version" : "4.015"
521 },
522 {
523 "class" : "Pod::Weaver::Section::Leftovers",
524 "name" : "Leftovers",
525 "version" : "4.015"
526 },
527 {
528 "class" : "Pod::Weaver::Section::Region",
529 "name" : "postlude",
530 "version" : "4.015"
531 },
532 {
533 "class" : "Pod::Weaver::Section::Authors",
534 "name" : "Authors",
535 "version" : "4.015"
536 },
537 {
538 "class" : "Pod::Weaver::Section::Legal",
539 "name" : "Legal",
540 "version" : "4.015"
541 }
542 ]
543 }
544 },
545 "name" : "@Author::KENTNL/PodWeaver",
546 "version" : "4.008"
547 },
548 {
549 "class" : "Dist::Zilla::Plugin::AutoPrereqs",
550 "name" : "@Author::KENTNL/AutoPrereqs",
551 "version" : "6.008"
552 },
553 {
554 "class" : "Dist::Zilla::Plugin::Prereqs",
555 "config" : {
556 "Dist::Zilla::Plugin::Prereqs" : {
557 "phase" : "develop",
558 "type" : "suggests"
559 }
560 },
561 "name" : "@Author::KENTNL/BundleDevelSuggests",
562 "version" : "6.008"
563 },
564 {
565 "class" : "Dist::Zilla::Plugin::Prereqs::AuthorDeps",
566 "name" : "@Author::KENTNL/Prereqs::AuthorDeps",
567 "version" : "0.006"
568 },
569 {
570 "class" : "Dist::Zilla::Plugin::MinimumPerl",
571 "name" : "@Author::KENTNL/MinimumPerl",
572 "version" : "1.006"
573 },
574 {
575 "class" : "Dist::Zilla::Plugin::Authority",
576 "name" : "@Author::KENTNL/Authority",
577 "version" : "1.009"
578 },
579 {
580 "class" : "Dist::Zilla::Plugin::MakeMaker",
581 "config" : {
582 "Dist::Zilla::Role::TestRunner" : {
583 "default_jobs" : "10"
584 }
585 },
586 "name" : "@Author::KENTNL/MakeMaker",
587 "version" : "6.008"
588 },
589 {
590 "class" : "Dist::Zilla::Plugin::Author::KENTNL::RecommendFixes",
591 "name" : "@Author::KENTNL/Author::KENTNL::RecommendFixes",
592 "version" : "0.005002"
593 },
594 {
595 "class" : "Dist::Zilla::Plugin::Readme::Brief",
596 "name" : "@Author::KENTNL/ShippedReadme",
597 "version" : "0.003001"
598 },
599 {
600 "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod",
601 "config" : {
602 "Dist::Zilla::Role::FileWatcher" : {
603 "version" : "0.006"
604 }
605 },
606 "name" : "@Author::KENTNL/ReadmeAnyFromPod",
607 "version" : "0.163250"
608 },
609 {
610 "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes",
611 "config" : {
612 "Dist::Zilla::Plugin::Test::CPAN::Changes" : {
613 "changelog" : "Changes"
614 }
615 },
616 "name" : "@Author::KENTNL/Test::CPAN::Changes",
617 "version" : "0.012"
618 },
619 {
620 "class" : "Dist::Zilla::Plugin::RunExtraTests",
621 "config" : {
622 "Dist::Zilla::Role::TestRunner" : {
623 "default_jobs" : "10"
624 }
625 },
626 "name" : "@Author::KENTNL/RunExtraTests",
627 "version" : "0.029"
628 },
629 {
630 "class" : "Dist::Zilla::Plugin::TestRelease",
631 "name" : "@Author::KENTNL/TestRelease",
632 "version" : "6.008"
633 },
634 {
635 "class" : "Dist::Zilla::Plugin::ConfirmRelease",
636 "name" : "@Author::KENTNL/ConfirmRelease",
637 "version" : "6.008"
638 },
639 {
640 "class" : "Dist::Zilla::Plugin::Git::Check",
641 "config" : {
642 "Dist::Zilla::Plugin::Git::Check" : {
643 "untracked_files" : "die"
644 },
645 "Dist::Zilla::Role::Git::DirtyFiles" : {
646 "allow_dirty" : [
647 "Changes",
648 "dist.ini"
649 ],
650 "allow_dirty_match" : [],
651 "changelog" : "Changes"
652 },
653 "Dist::Zilla::Role::Git::Repo" : {
654 "git --version" : "2.11.1",
655 "repo_root" : "."
656 }
657 },
658 "name" : "@Author::KENTNL/Git::Check",
659 "version" : "2.041"
660 },
661 {
662 "class" : "Dist::Zilla::Plugin::Git::Commit",
663 "config" : {
664 "Dist::Zilla::Plugin::Git::Commit" : {
665 "add_files_in" : [],
666 "commit_msg" : "v%v%n%n%c"
667 },
668 "Dist::Zilla::Role::Git::DirtyFiles" : {
669 "allow_dirty" : [
670 "Changes",
671 "dist.ini"
672 ],
673 "allow_dirty_match" : [],
674 "changelog" : "Changes"
675 },
676 "Dist::Zilla::Role::Git::Repo" : {
677 "git --version" : "2.11.1",
678 "repo_root" : "."
679 },
680 "Dist::Zilla::Role::Git::StringFormatter" : {
681 "time_zone" : "local"
682 }
683 },
684 "name" : "@Author::KENTNL/commit_dirty_files",
685 "version" : "2.041"
686 },
687 {
688 "class" : "Dist::Zilla::Plugin::Git::Tag",
689 "config" : {
690 "Dist::Zilla::Plugin::Git::Tag" : {
691 "branch" : null,
692 "changelog" : "Changes",
693 "signed" : 0,
694 "tag" : "1.001004-source",
695 "tag_format" : "%v-source",
696 "tag_message" : "v%v"
697 },
698 "Dist::Zilla::Role::Git::Repo" : {
699 "git --version" : "2.11.1",
700 "repo_root" : "."
701 },
702 "Dist::Zilla::Role::Git::StringFormatter" : {
703 "time_zone" : "local"
704 }
705 },
706 "name" : "@Author::KENTNL/tag_master",
707 "version" : "2.041"
708 },
709 {
710 "class" : "Dist::Zilla::Plugin::Git::NextRelease",
711 "config" : {
712 "Dist::Zilla::Plugin::Git::NextRelease" : {
713 "default_branch" : "master"
714 }
715 },
716 "name" : "@Author::KENTNL/Git::NextRelease",
717 "version" : "0.004000"
718 },
719 {
720 "class" : "Dist::Zilla::Plugin::BumpVersionAfterRelease",
721 "config" : {
722 "Dist::Zilla::Plugin::BumpVersionAfterRelease" : {
723 "finders" : [
724 ":ExecFiles",
725 ":InstallModules"
726 ],
727 "global" : 0,
728 "munge_makefile_pl" : 1
729 }
730 },
731 "name" : "@Author::KENTNL/BumpVersionAfterRelease",
732 "version" : "0.015"
733 },
734 {
735 "class" : "Dist::Zilla::Plugin::Git::Commit",
736 "config" : {
737 "Dist::Zilla::Plugin::Git::Commit" : {
738 "add_files_in" : [],
739 "commit_msg" : "v%v%n%n%c"
740 },
741 "Dist::Zilla::Role::Git::DirtyFiles" : {
742 "allow_dirty" : [
743 "Changes",
744 "dist.ini"
745 ],
746 "allow_dirty_match" : [
747 "(?^u:^lib/)"
748 ],
749 "changelog" : "Changes"
750 },
751 "Dist::Zilla::Role::Git::Repo" : {
752 "git --version" : "2.11.1",
753 "repo_root" : "."
754 },
755 "Dist::Zilla::Role::Git::StringFormatter" : {
756 "time_zone" : "local"
757 }
758 },
759 "name" : "@Author::KENTNL/commit_release_changes",
760 "version" : "2.041"
761 },
762 {
763 "class" : "Dist::Zilla::Plugin::Git::CommitBuild",
764 "config" : {
765 "Dist::Zilla::Plugin::Git::CommitBuild" : {
766 "branch" : "builds",
767 "build_root" : null,
768 "message" : "Build results of %h (on %b)",
769 "multiple_inheritance" : 0,
770 "release_branch" : "releases",
771 "release_message" : "Build results of %h (on %b)"
772 },
773 "Dist::Zilla::Role::Git::Repo" : {
774 "git --version" : "2.11.1",
775 "repo_root" : "."
776 }
777 },
778 "name" : "@Author::KENTNL/Git::CommitBuild",
779 "version" : "2.041"
780 },
781 {
782 "class" : "Dist::Zilla::Plugin::Git::Tag",
783 "config" : {
784 "Dist::Zilla::Plugin::Git::Tag" : {
785 "branch" : "releases",
786 "changelog" : "Changes",
787 "signed" : 0,
788 "tag" : "1.001004",
789 "tag_format" : "%v",
790 "tag_message" : "v%v"
791 },
792 "Dist::Zilla::Role::Git::Repo" : {
793 "git --version" : "2.11.1",
794 "repo_root" : "."
795 },
796 "Dist::Zilla::Role::Git::StringFormatter" : {
797 "time_zone" : "local"
798 }
799 },
800 "name" : "@Author::KENTNL/tag_release",
801 "version" : "2.041"
802 },
803 {
804 "class" : "Dist::Zilla::Plugin::UploadToCPAN",
805 "name" : "@Author::KENTNL/UploadToCPAN",
806 "version" : "6.008"
807 },
808 {
809 "class" : "Dist::Zilla::Plugin::Twitter",
810 "name" : "@Author::KENTNL/Twitter",
811 "version" : "0.026"
812 },
813 {
814 "class" : "Dist::Zilla::Plugin::Prereqs::Upgrade",
815 "config" : {
816 "Dist::Zilla::Plugin::Prereqs::Upgrade" : {
817 "modules" : {
818 "Dist::Zila::Plugin::MetaProvides::Package" : "2.000000",
819 "Dist::Zilla" : "5",
820 "ExtUtils::MakeMaker" : "7.00",
821 "File::ShareDir::Install" : "0.10",
822 "Moo" : "1.000008",
823 "Moose" : "2.000",
824 "Path::Tiny" : "0.058",
825 "Test::File::ShareDir" : "1.000000",
826 "Test::More" : "0.99"
827 }
828 }
829 },
830 "name" : "@Author::KENTNL/Prereqs::Upgrade",
831 "version" : "0.001001"
832 },
833 {
834 "class" : "Dist::Zilla::Plugin::Prereqs::Recommend::MatchInstalled",
835 "config" : {
836 "Dist::Zilla::Plugin::Prereqs::Recommend::MatchInstalled" : {
837 "applyto_map" : [
838 "develop.suggests = develop.suggests"
839 ],
840 "applyto_phase" : [
841 "develop"
842 ],
843 "modules" : [
844 "Dist::Zilla::PluginBundle::Author::KENTNL",
845 "Dist::Zilla::App::Command::bakeini"
846 ],
847 "source_relation" : "requires",
848 "target_relation" : "recommends"
849 }
850 },
851 "name" : "@Author::KENTNL/always_latest_develop_bundle",
852 "version" : "0.003001"
853 },
854 {
855 "class" : "Dist::Zilla::Plugin::RemovePrereqs::Provided",
856 "name" : "@Author::KENTNL/RemovePrereqs::Provided",
857 "version" : "0.001000"
858 },
859 {
860 "class" : "Dist::Zilla::Plugin::Prereqs",
861 "config" : {
862 "Dist::Zilla::Plugin::Prereqs" : {
863 "phase" : "develop",
864 "type" : "requires"
865 }
866 },
867 "name" : "@Author::KENTNL/::Role::BundleDeps",
868 "version" : "6.008"
869 },
870 {
871 "class" : "Dist::Zilla::Plugin::Prereqs",
872 "config" : {
873 "Dist::Zilla::Plugin::Prereqs" : {
874 "phase" : "runtime",
875 "type" : "requires"
876 }
877 },
878 "name" : "Prereqs",
879 "version" : "6.008"
880 },
881 {
882 "class" : "Dist::Zilla::Plugin::FinderCode",
883 "name" : ":InstallModules",
884 "version" : "6.008"
885 },
886 {
887 "class" : "Dist::Zilla::Plugin::FinderCode",
888 "name" : ":IncModules",
889 "version" : "6.008"
890 },
891 {
892 "class" : "Dist::Zilla::Plugin::FinderCode",
893 "name" : ":TestFiles",
894 "version" : "6.008"
895 },
896 {
897 "class" : "Dist::Zilla::Plugin::FinderCode",
898 "name" : ":ExtraTestFiles",
899 "version" : "6.008"
900 },
901 {
902 "class" : "Dist::Zilla::Plugin::FinderCode",
903 "name" : ":ExecFiles",
904 "version" : "6.008"
905 },
906 {
907 "class" : "Dist::Zilla::Plugin::FinderCode",
908 "name" : ":PerlExecFiles",
909 "version" : "6.008"
910 },
911 {
912 "class" : "Dist::Zilla::Plugin::FinderCode",
913 "name" : ":ShareFiles",
914 "version" : "6.008"
915 },
916 {
917 "class" : "Dist::Zilla::Plugin::FinderCode",
918 "name" : ":MainModule",
919 "version" : "6.008"
920 },
921 {
922 "class" : "Dist::Zilla::Plugin::FinderCode",
923 "name" : ":AllFiles",
924 "version" : "6.008"
925 },
926 {
927 "class" : "Dist::Zilla::Plugin::FinderCode",
928 "name" : ":NoFiles",
929 "version" : "6.008"
930 },
931 {
932 "class" : "Dist::Zilla::Plugin::FinderCode",
933 "name" : "@Author::KENTNL/MetaProvides::Package/AUTOVIV/:InstallModulesPM",
934 "version" : "6.008"
935 }
936 ],
937 "zilla" : {
938 "class" : "Dist::Zilla::Dist::Builder",
939 "config" : {
940 "is_trial" : 0
941 },
942 "version" : "6.008"
943 }
944 },
945 "x_authority" : "cpan:KENTNL",
946 "x_serialization_backend" : "Cpanel::JSON::XS version 3.0227"
62 "version" : "1.001005",
63 "x_serialization_backend" : "JSON::PP version 4.04"
94764 }
948
1212 FindBin: '0'
1313 Moose: '0'
1414 Test::More: '0'
15 perl: '5.006'
1615 configure_requires:
1716 ExtUtils::MakeMaker: '0'
18 perl: '5.006'
19 dynamic_config: 0
20 generated_by: 'Dist::Zilla version 6.008, CPAN::Meta::Converter version 2.150010'
17 dynamic_config: 1
18 generated_by: 'ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010'
2119 license: perl
2220 meta-spec:
2321 url: http://module-build.sourceforge.net/META-spec-v1.4.html
2422 version: '1.4'
2523 name: Dist-Zilla-Role-Bootstrap
26 provides:
27 Dist::Zilla::Role::Bootstrap:
28 file: lib/Dist/Zilla/Role/Bootstrap.pm
29 version: '1.001004'
30 recommends:
31 Path::Tiny: '0.058'
24 no_index:
25 directory:
26 - t
27 - inc
3228 requires:
3329 Carp: '0'
3430 Dist::Zilla::Role::Plugin: '0'
4036 strict: '0'
4137 version: '0'
4238 warnings: '0'
43 resources:
44 bugtracker: https://github.com/kentnl/Dist-Zilla-Role-Bootstrap/issues
45 homepage: https://github.com/kentnl/Dist-Zilla-Role-Bootstrap
46 repository: https://github.com/kentnl/Dist-Zilla-Role-Bootstrap.git
47 version: '1.001004'
39 version: '1.001005'
40 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
3838 "Moose" => 0,
3939 "Test::More" => 0
4040 },
41 "VERSION" => "1.001004",
41 "VERSION" => "1.001005",
4242 "test" => {
4343 "TESTS" => "t/*.t t/00-compile/*.t"
4444 }
+0
-48
README less more
0 Dist::Zilla::Role::Bootstrap
1
2 This module is a role that aims to be consumed by plugins that want to
3 perform some very early bootstrap operation that may affect the loading
4 environment of successive plugins, especially with regards to plugins
5 that may wish to build with themselves, either by consuming the source
6 tree itself, or by consuming a previous built iteration.
7
8 Implementation is quite simple:
9
10 1. "with" this role in your plugin
11 with 'Dist::Zilla::Role::Bootstrap'
12
13 2. Implement the "bootstrap" sub.
14 sub bootstrap {
15 my ( $self ) = @_;
16 }
17
18 3. *Optional*: Fetch the discovered "bootstap" root via:
19 $self->_bootstap_root
20
21 4. *Optional*: Load some path into @INC via:
22 $self->_add_inc($path)
23
24 INSTALLATION
25
26 This is a Perl module distribution. It should be installed with whichever
27 tool you use to manage your installation of Perl, e.g. any of
28
29 cpanm .
30 cpan .
31 cpanp -i .
32
33 Consult http://www.cpan.org/modules/INSTALL.html for further instruction.
34 Should you wish to install this module manually, the procedure is
35
36 perl Makefile.PL
37 make
38 make test
39 make install
40
41 COPYRIGHT AND LICENSE
42
43 This software is copyright (c) 2017 by Kent Fredric
44 <kentfredric@gmail.com>.
45
46 This is free software; you can redistribute it and/or modify it under
47 the same terms as the Perl 5 programming language system itself.
0 # NAME
1
2 Dist::Zilla::Role::Bootstrap - Shared logic for bootstrap things.
3
4 # VERSION
5
6 version 1.001005
7
8 # SYNOPSIS
9
10 For consuming plugins:
11
12 use Moose;
13 with 'Dist::Zilla::Role::Bootstrap';
14
15 sub bootstrap {
16 my $bootstrap_root = $_[0]->_bootstrap_root;
17 # Do the actual bootstrap work here
18 $_[0]->_add_inc('./some/path/here');
19 }
20
21 For users of plugins:
22
23 [Some::Plugin::Name]
24 try_built = 0 ; # use / as the root to bootstrap
25 try_built = 1 ; # try to use /Dist-Name-.*/ instead of /
26
27 fallback = 0 ; # don't bootstrap at all if /Dist-Name-.*/ matches != 1 things
28 fallback = 1 ; # fallback to / if /Dist-Name-.*/ matches != 1 things
29
30 # DESCRIPTION
31
32 This module is a role that aims to be consumed by plugins that want to perform
33 some very early bootstrap operation that may affect the loading environment of
34 successive plugins, especially with regards to plugins that may wish to build with
35 themselves, either by consuming the source tree itself, or by consuming a previous
36 built iteration.
37
38 Implementation is quite simple:
39
40 - 1. `with` this role in your plugin
41
42 with 'Dist::Zilla::Role::Bootstrap'
43
44 - 2. Implement the `bootstrap` sub.
45
46 sub bootstrap {
47 my ( $self ) = @_;
48 }
49
50 - 3. _Optional_: Fetch the discovered `bootstap` root via:
51
52 $self->_bootstap_root
53
54 - 4. _Optional_: Load some path into `@INC` via:
55
56 $self->_add_inc($path)
57
58 # REQUIRED METHODS
59
60 ## `bootstrap`
61
62 Any user specified `bootstrap` method will be invoked during `plugin_from_config`.
63
64 This is **AFTER** `->new`, **AFTER** `->BUILD`, and **AFTER** `dzil`'s internal `plugin_from_config` steps.
65
66 This occurs within the `register_component` phase of the plug-in loading and configuration.
67
68 This also occurs **BEFORE** `Dist::Zilla` attaches the plug-in into the plug-in stash.
69
70 # ATTRIBUTES
71
72 ## `distname`
73
74 The name of the distribution.
75
76 This value is vivified by asking `zilla->name`.
77
78 Usually this value is populated by `dist.ini` in the property `name`
79
80 However, occasionally, this value is discovered by a `plugin`.
81
82 In such a case, that plugin cannot be bootstrapped, because that plugin **MUST** be loaded prior to bootstrap.
83
84 ## `try_built`
85
86 This attribute controls how the consuming `plugin` behaves.
87
88 - false **(default)** : bootstrapping is only done to `PROJECTROOT/lib`
89 - true : bootstrap attempts to try `PROJECTROOT/<distname>-<version>/lib`
90
91 ## `fallback`
92
93 This attribute is for use in conjunction with `try_built`
94
95 - `false` : When `PROJECTROOT/<distname>-<version>` does not exist, don't perform any bootstrapping
96 - `true` **(default)** : When `PROJECTROOT/<distname>-<version>` does not exist, bootstrap to `PROJECTROOT/lib`
97
98 ## `try_built_method`
99
100 This attribute controls how `try_built` behaves when multiple directories exist that match `PROJECTROOT/<distname>-.*`
101
102 Two valid options at this time:
103
104 - `mtime` **(default)** : Pick the directory with the most recent `mtime`
105 - `parseversion` : Attempt to parse versions on all candidate directories and use the one with the largest version.
106
107 Prior to `0.2.0` this property did not exist, and default behavior was to assume `0 Candidates` and `2 or more Candidates` were the same problem.
108
109 # AUTHOR
110
111 Kent Fredric <kentnl@cpan.org>
112
113 # COPYRIGHT AND LICENSE
114
115 This software is copyright (c) 2017 by Kent Fredric <kentfredric@gmail.com>.
116
117 This is free software; you can redistribute it and/or modify it under
118 the same terms as the Perl 5 programming language system itself.
33
44 package Dist::Zilla::Role::Bootstrap;
55
6 our $VERSION = '1.001004';
6 our $VERSION = '1.001005';
77
88 # ABSTRACT: Shared logic for bootstrap things.
99
10 our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
10 # AUTHORITY
1111
1212 use Moose::Role qw( with has around requires );
1313 use List::UtilsBy qw( max_by nmax_by );
1414 use version qw();
1515
16
17
18
19
20
21
22
23
24
25
26
16 =begin MetaPOD::JSON v1.1.0
17
18 {
19 "namespace":"Dist::Zilla::Role::Bootstrap",
20 "interface":"role",
21 "does":"Dist::Zilla::Role::Plugin"
22 }
23
24 =end MetaPOD::JSON
25
26 =cut
2727
2828 with 'Dist::Zilla::Role::Plugin';
2929
4242 return $config;
4343 };
4444
45
46
47
48
49
50
51
52
53
54
55
56
57
45 =attr C<distname>
46
47 The name of the distribution.
48
49 This value is vivified by asking C<< zilla->name >>.
50
51 Usually this value is populated by C<dist.ini> in the property C<name>
52
53 However, occasionally, this value is discovered by a C<plugin>.
54
55 In such a case, that plugin cannot be bootstrapped, because that plugin B<MUST> be loaded prior to bootstrap.
56
57 =cut
5858
5959 has distname => ( isa => 'Str', is => ro =>, lazy_build => 1 );
6060
6767 return Path::Tiny::path( $_[0]->zilla->root );
6868 }
6969
70
71
72
73
74
75
76
77
78
79
80
81
82
70 =attr C<try_built>
71
72 This attribute controls how the consuming C<plugin> behaves.
73
74 =over 4
75
76 =item * false B<(default)> : bootstrapping is only done to C<PROJECTROOT/lib>
77
78 =item * true : bootstrap attempts to try C<< PROJECTROOT/<distname>-<version>/lib >>
79
80 =back
81
82 =cut
8383
8484 has try_built => ( isa => 'Bool', is => ro =>, lazy_build => 1, );
8585 sub _build_try_built { return }
8686
87
88
89
90
91
92
93
94
95
96
97
98
99
87 =attr C<fallback>
88
89 This attribute is for use in conjunction with C<try_built>
90
91 =over 4
92
93 =item * C<false> : When C<< PROJECTROOT/<distname>-<version> >> does not exist, don't perform any bootstrapping
94
95 =item * C<true> B<(default)> : When C<< PROJECTROOT/<distname>-<version> >> does not exist, bootstrap to C<< PROJECTROOT/lib >>
96
97 =back
98
99 =cut
100100
101101 has fallback => ( isa => 'Bool', is => ro =>, lazy_build => 1 );
102102 sub _build_fallback { 1 }
103103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
104 =attr C<try_built_method>
105
106 This attribute controls how C<try_built> behaves when multiple directories exist that match C<< PROJECTROOT/<distname>-.* >>
107
108 Two valid options at this time:
109
110 =over 4
111
112 =item * C<mtime> B<(default)> : Pick the directory with the most recent C<mtime>
113
114 =item * C<parseversion> : Attempt to parse versions on all candidate directories and use the one with the largest version.
115
116 =back
117
118 Prior to C<0.2.0> this property did not exist, and default behavior was to assume C<0 Candidates> and C<2 or more Candidates> were the same problem.
119
120 =cut
121121
122122 has try_built_method => ( isa => 'Str', is => ro =>, lazy_build => 1, );
123123 sub _build_try_built_method { 'mtime' }
198198 return Carp::croak('At this time, _add_inc(arg) only supports scalar values of arg');
199199 }
200200
201
202
203
204
205
206
207
208
209
210
211
201 =requires C<bootstrap>
202
203 Any user specified C<bootstrap> method will be invoked during C<plugin_from_config>.
204
205 This is B<AFTER> C<< ->new >>, B<AFTER> C<< ->BUILD >>, and B<AFTER> C<dzil>'s internal C<plugin_from_config> steps.
206
207 This occurs within the C<register_component> phase of the plug-in loading and configuration.
208
209 This also occurs B<BEFORE> C<Dist::Zilla> attaches the plug-in into the plug-in stash.
210
211 =cut
212212
213213 requires 'bootstrap';
214214
225225 no Moose::Role;
226226
227227 1;
228
229 __END__
230
231 =pod
232
233 =encoding UTF-8
234
235 =head1 NAME
236
237 Dist::Zilla::Role::Bootstrap - Shared logic for bootstrap things.
238
239 =head1 VERSION
240
241 version 1.001004
242228
243229 =head1 SYNOPSIS
244230
294280
295281 =back
296282
297 =head1 REQUIRED METHODS
298
299 =head2 C<bootstrap>
300
301 Any user specified C<bootstrap> method will be invoked during C<plugin_from_config>.
302
303 This is B<AFTER> C<< ->new >>, B<AFTER> C<< ->BUILD >>, and B<AFTER> C<dzil>'s internal C<plugin_from_config> steps.
304
305 This occurs within the C<register_component> phase of the plug-in loading and configuration.
306
307 This also occurs B<BEFORE> C<Dist::Zilla> attaches the plug-in into the plug-in stash.
308
309 =head1 ATTRIBUTES
310
311 =head2 C<distname>
312
313 The name of the distribution.
314
315 This value is vivified by asking C<< zilla->name >>.
316
317 Usually this value is populated by C<dist.ini> in the property C<name>
318
319 However, occasionally, this value is discovered by a C<plugin>.
320
321 In such a case, that plugin cannot be bootstrapped, because that plugin B<MUST> be loaded prior to bootstrap.
322
323 =head2 C<try_built>
324
325 This attribute controls how the consuming C<plugin> behaves.
326
327 =over 4
328
329 =item * false B<(default)> : bootstrapping is only done to C<PROJECTROOT/lib>
330
331 =item * true : bootstrap attempts to try C<< PROJECTROOT/<distname>-<version>/lib >>
332
333 =back
334
335 =head2 C<fallback>
336
337 This attribute is for use in conjunction with C<try_built>
338
339 =over 4
340
341 =item * C<false> : When C<< PROJECTROOT/<distname>-<version> >> does not exist, don't perform any bootstrapping
342
343 =item * C<true> B<(default)> : When C<< PROJECTROOT/<distname>-<version> >> does not exist, bootstrap to C<< PROJECTROOT/lib >>
344
345 =back
346
347 =head2 C<try_built_method>
348
349 This attribute controls how C<try_built> behaves when multiple directories exist that match C<< PROJECTROOT/<distname>-.* >>
350
351 Two valid options at this time:
352
353 =over 4
354
355 =item * C<mtime> B<(default)> : Pick the directory with the most recent C<mtime>
356
357 =item * C<parseversion> : Attempt to parse versions on all candidate directories and use the one with the largest version.
358
359 =back
360
361 Prior to C<0.2.0> this property did not exist, and default behavior was to assume C<0 Candidates> and C<2 or more Candidates> were the same problem.
362
363 =begin MetaPOD::JSON v1.1.0
364
365 {
366 "namespace":"Dist::Zilla::Role::Bootstrap",
367 "interface":"role",
368 "does":"Dist::Zilla::Role::Plugin"
369 }
370
371
372 =end MetaPOD::JSON
373
374 =head1 AUTHOR
375
376 Kent Fredric <kentnl@cpan.org>
377
378 =head1 COPYRIGHT AND LICENSE
379
380 This software is copyright (c) 2017 by Kent Fredric <kentfredric@gmail.com>.
381
382 This is free software; you can redistribute it and/or modify it under
383 the same terms as the Perl 5 programming language system itself.
384
385 =cut
283
284 =cut
00 This file contains changes in REQUIRED dependencies for standard CPAN phases (configure/build/runtime/test)
11
2 1.001004
2 1.001005
3
4 1.001004 2017-03-03T07:00:55Z
35 [Changed / test requires]
46 - Test::More 0.89 → 0
57
00 This file contains ALL changes in dependencies in both REQUIRED / OPTIONAL dependencies for all phases (configure/build/runtime/test/develop)
11
2 1.001004
2 1.001005
3
4 1.001004 2017-03-03T07:00:55Z
35 [Added / develop requires]
46 - Test::MinimumVersion
57
00 This file contains changes to DEVELOPMENT dependencies only ( both REQUIRED and OPTIONAL )
11
2 1.001004
2 1.001005
3
4 1.001004 2017-03-03T07:00:55Z
35 [Added / develop requires]
46 - Test::MinimumVersion
57
00 This file contains changes in OPTIONAL dependencies for standard CPAN phases (configure/build/runtime/test)
11
2 1.001004
2 1.001005
3
4 1.001004 2017-03-03T07:00:55Z
35
46 1.001003 2016-04-29T22:50:28Z
57
+0
-102
misc/built_with.json less more
0 {
1 "modules" : {
2 "CPAN::Meta" : "2.150010",
3 "Carp" : "1.42",
4 "Dist::Zilla" : "6.008",
5 "Dist::Zilla::App::Command::bakeini" : "0.002005",
6 "Dist::Zilla::Chrome::Test" : "6.008",
7 "Dist::Zilla::Dist::Builder" : "6.008",
8 "Dist::Zilla::MVP::Assembler::Zilla" : "6.008",
9 "Dist::Zilla::MVP::Section" : "6.008",
10 "Dist::Zilla::Plugin::Author::KENTNL::CONTRIBUTING" : "0.001005",
11 "Dist::Zilla::Plugin::Author::KENTNL::RecommendFixes" : "0.005002",
12 "Dist::Zilla::Plugin::Author::KENTNL::TravisCI" : "0.001003",
13 "Dist::Zilla::Plugin::Authority" : "1.009",
14 "Dist::Zilla::Plugin::AutoPrereqs" : "6.008",
15 "Dist::Zilla::Plugin::BumpVersionAfterRelease" : "0.015",
16 "Dist::Zilla::Plugin::ConfirmRelease" : "6.008",
17 "Dist::Zilla::Plugin::CopyFilesFromBuild" : "0.163040",
18 "Dist::Zilla::Plugin::Git::Check" : "2.041",
19 "Dist::Zilla::Plugin::Git::Commit" : "2.041",
20 "Dist::Zilla::Plugin::Git::CommitBuild" : "2.041",
21 "Dist::Zilla::Plugin::Git::Contributors" : "0.029",
22 "Dist::Zilla::Plugin::Git::GatherDir" : "2.041",
23 "Dist::Zilla::Plugin::Git::NextRelease" : "0.004000",
24 "Dist::Zilla::Plugin::Git::Tag" : "2.041",
25 "Dist::Zilla::Plugin::GithubMeta" : "0.54",
26 "Dist::Zilla::Plugin::License" : "6.008",
27 "Dist::Zilla::Plugin::MakeMaker" : "6.008",
28 "Dist::Zilla::Plugin::Manifest" : "6.008",
29 "Dist::Zilla::Plugin::ManifestSkip" : "6.008",
30 "Dist::Zilla::Plugin::MetaConfig" : "6.008",
31 "Dist::Zilla::Plugin::MetaData::BuiltWith" : "1.004005",
32 "Dist::Zilla::Plugin::MetaJSON" : "6.008",
33 "Dist::Zilla::Plugin::MetaProvides::Package" : "2.004003",
34 "Dist::Zilla::Plugin::MetaTests" : "6.008",
35 "Dist::Zilla::Plugin::MetaYAML::Minimal" : "0.001000",
36 "Dist::Zilla::Plugin::MinimumPerl" : "1.006",
37 "Dist::Zilla::Plugin::PodCoverageTests" : "6.008",
38 "Dist::Zilla::Plugin::PodSyntaxTests" : "6.008",
39 "Dist::Zilla::Plugin::PodWeaver" : "4.008",
40 "Dist::Zilla::Plugin::Prereqs" : "6.008",
41 "Dist::Zilla::Plugin::Prereqs::AuthorDeps" : "0.006",
42 "Dist::Zilla::Plugin::Prereqs::Recommend::MatchInstalled" : "0.003001",
43 "Dist::Zilla::Plugin::Prereqs::Upgrade" : "0.001001",
44 "Dist::Zilla::Plugin::Readme::Brief" : "0.003001",
45 "Dist::Zilla::Plugin::ReadmeAnyFromPod" : "0.163250",
46 "Dist::Zilla::Plugin::RemovePrereqs::Provided" : "0.001000",
47 "Dist::Zilla::Plugin::RewriteVersion::Sanitized" : "0.001005",
48 "Dist::Zilla::Plugin::RunExtraTests" : "0.029",
49 "Dist::Zilla::Plugin::Test::CPAN::Changes" : "0.012",
50 "Dist::Zilla::Plugin::Test::Compile::PerFile" : "0.004000",
51 "Dist::Zilla::Plugin::Test::EOL" : "0.19",
52 "Dist::Zilla::Plugin::Test::Kwalitee" : "2.12",
53 "Dist::Zilla::Plugin::Test::MinimumVersion" : "2.000007",
54 "Dist::Zilla::Plugin::Test::Perl::Critic" : "3.000",
55 "Dist::Zilla::Plugin::Test::ReportPrereqs" : "0.025",
56 "Dist::Zilla::Plugin::TestRelease" : "6.008",
57 "Dist::Zilla::Plugin::Twitter" : "0.026",
58 "Dist::Zilla::Plugin::UploadToCPAN" : "6.008",
59 "Dist::Zilla::PluginBundle::Author::KENTNL" : "2.025020",
60 "Dist::Zilla::Role::Plugin" : "6.008",
61 "English" : "1.10",
62 "ExtUtils::MakeMaker" : "7.24",
63 "File::Copy::Recursive" : "0.38",
64 "File::Spec" : "3.66",
65 "FindBin" : "1.51",
66 "List::UtilsBy" : "0.10",
67 "Moose" : "2.2004",
68 "Moose::Role" : "2.2004",
69 "Path::Tiny" : "0.104",
70 "Pod::Coverage::TrustPod" : "0.100003",
71 "Software::License::Perl_5" : "0.103012",
72 "Test::CPAN::Changes" : "0.400002",
73 "Test::CPAN::Meta" : "0.25",
74 "Test::EOL" : "1.6",
75 "Test::Kwalitee" : "1.25",
76 "Test::MinimumVersion" : "0.101082",
77 "Test::More" : "1.302073",
78 "Test::Pod" : "1.51",
79 "Test::Pod::Coverage" : "1.10",
80 "lib" : "0.64",
81 "strict" : "1.11",
82 "version" : "0.9917",
83 "warnings" : "1.37"
84 },
85 "perl" : {
86 "original" : "v5.25.10",
87 "qv" : 1,
88 "version" : [
89 5,
90 25,
91 10
92 ]
93 },
94 "perl-config" : {
95 "gccversion" : "5.4.0",
96 "myarchname" : "x86_64-linux",
97 "osname" : "linux"
98 },
99 "platform" : "linux",
100 "uname" : "Linux 4.8.5-gentoo x86_64 GenuineIntel GNU/Linux"
101 }
+0
-17
t/00-compile/lib_Dist_Zilla_Role_Bootstrap_pm.t less more
0 # This test was generated for <lib/Dist/Zilla/Role/Bootstrap.pm>
1 # using by Dist::Zilla::Plugin::Test::Compile::PerFile ( @Author::KENTNL/Test::Compile::PerFile ) version 0.004000
2 # with template 02-raw-require.t.tpl
3 my $file = "Dist/Zilla/Role/Bootstrap.pm";
4 my $err;
5 {
6 local $@;
7 eval { require $file; 1 } or $err = $@;
8 };
9
10 if( not defined $err ) {
11 print "1..1\nok 1 - require ${file}\n";
12 exit 0;
13 }
14 print "1..1\nnot ok 1 - require ${file}\n";
15 print STDERR "# ${_}\n" for split /\n/, $err;
16 exit 1;
+0
-123
t/00-report-prereqs.dd less more
0 do { my $x = {
1 'configure' => {
2 'recommends' => {
3 'ExtUtils::MakeMaker' => '7.00'
4 },
5 'requires' => {
6 'ExtUtils::MakeMaker' => '0',
7 'perl' => '5.006'
8 }
9 },
10 'develop' => {
11 'recommends' => {
12 'Test::More' => '0.99'
13 },
14 'requires' => {
15 'Dist::Zilla' => '5',
16 'Dist::Zilla::Plugin::Author::KENTNL::CONTRIBUTING' => '0.001003',
17 'Dist::Zilla::Plugin::Author::KENTNL::RecommendFixes' => '0.004002',
18 'Dist::Zilla::Plugin::Author::KENTNL::TravisCI' => '0.001002',
19 'Dist::Zilla::Plugin::Authority' => '1.006',
20 'Dist::Zilla::Plugin::AutoPrereqs' => '0',
21 'Dist::Zilla::Plugin::BumpVersionAfterRelease' => '0',
22 'Dist::Zilla::Plugin::ConfirmRelease' => '0',
23 'Dist::Zilla::Plugin::CopyFilesFromBuild' => '0',
24 'Dist::Zilla::Plugin::Git::Check' => '0',
25 'Dist::Zilla::Plugin::Git::Commit' => '0',
26 'Dist::Zilla::Plugin::Git::CommitBuild' => '0',
27 'Dist::Zilla::Plugin::Git::Contributors' => '0.006',
28 'Dist::Zilla::Plugin::Git::GatherDir' => '0',
29 'Dist::Zilla::Plugin::Git::NextRelease' => '0.004000',
30 'Dist::Zilla::Plugin::Git::Tag' => '0',
31 'Dist::Zilla::Plugin::GithubMeta' => '0',
32 'Dist::Zilla::Plugin::License' => '0',
33 'Dist::Zilla::Plugin::MakeMaker' => '0',
34 'Dist::Zilla::Plugin::Manifest' => '0',
35 'Dist::Zilla::Plugin::ManifestSkip' => '0',
36 'Dist::Zilla::Plugin::MetaConfig' => '0',
37 'Dist::Zilla::Plugin::MetaData::BuiltWith' => '1.004000',
38 'Dist::Zilla::Plugin::MetaJSON' => '0',
39 'Dist::Zilla::Plugin::MetaProvides::Package' => '1.14000001',
40 'Dist::Zilla::Plugin::MetaTests' => '0',
41 'Dist::Zilla::Plugin::MetaYAML::Minimal' => '0',
42 'Dist::Zilla::Plugin::MinimumPerl' => '0',
43 'Dist::Zilla::Plugin::PodCoverageTests' => '0',
44 'Dist::Zilla::Plugin::PodSyntaxTests' => '0',
45 'Dist::Zilla::Plugin::PodWeaver' => '0',
46 'Dist::Zilla::Plugin::Prereqs' => '0',
47 'Dist::Zilla::Plugin::Prereqs::AuthorDeps' => '0',
48 'Dist::Zilla::Plugin::Prereqs::Recommend::MatchInstalled' => '0',
49 'Dist::Zilla::Plugin::Prereqs::Upgrade' => '0',
50 'Dist::Zilla::Plugin::Readme::Brief' => '0',
51 'Dist::Zilla::Plugin::ReadmeAnyFromPod' => '0',
52 'Dist::Zilla::Plugin::RemovePrereqs::Provided' => '0',
53 'Dist::Zilla::Plugin::RewriteVersion::Sanitized' => '0',
54 'Dist::Zilla::Plugin::RunExtraTests' => '0',
55 'Dist::Zilla::Plugin::Test::CPAN::Changes' => '0',
56 'Dist::Zilla::Plugin::Test::Compile::PerFile' => '0.003902',
57 'Dist::Zilla::Plugin::Test::EOL' => '0',
58 'Dist::Zilla::Plugin::Test::Kwalitee' => '0',
59 'Dist::Zilla::Plugin::Test::MinimumVersion' => '0',
60 'Dist::Zilla::Plugin::Test::Perl::Critic' => '0',
61 'Dist::Zilla::Plugin::Test::ReportPrereqs' => '0',
62 'Dist::Zilla::Plugin::TestRelease' => '0',
63 'Dist::Zilla::Plugin::Twitter' => '0',
64 'Dist::Zilla::Plugin::UploadToCPAN' => '0',
65 'English' => '0',
66 'Pod::Coverage::TrustPod' => '0',
67 'Software::License::Perl_5' => '0',
68 'Test::CPAN::Changes' => '0.19',
69 'Test::CPAN::Meta' => '0',
70 'Test::EOL' => '0',
71 'Test::Kwalitee' => '1.21',
72 'Test::MinimumVersion' => '0',
73 'Test::More' => '0.96',
74 'Test::Pod' => '1.41',
75 'Test::Pod::Coverage' => '1.08'
76 },
77 'suggests' => {
78 'Dist::Zilla::App::Command::bakeini' => '0.002005',
79 'Dist::Zilla::PluginBundle::Author::KENTNL' => '2.025020'
80 }
81 },
82 'runtime' => {
83 'recommends' => {
84 'Path::Tiny' => '0.058'
85 },
86 'requires' => {
87 'Carp' => '0',
88 'Dist::Zilla::Role::Plugin' => '0',
89 'List::UtilsBy' => '0',
90 'Moose::Role' => '0',
91 'Path::Tiny' => '0',
92 'lib' => '0',
93 'perl' => '5.006',
94 'strict' => '0',
95 'version' => '0',
96 'warnings' => '0'
97 }
98 },
99 'test' => {
100 'recommends' => {
101 'CPAN::Meta' => '2.120900',
102 'ExtUtils::MakeMaker' => '7.00',
103 'Moose' => '2.000',
104 'Test::More' => '0.99'
105 },
106 'requires' => {
107 'Dist::Zilla::Chrome::Test' => '0',
108 'Dist::Zilla::Dist::Builder' => '0',
109 'Dist::Zilla::MVP::Assembler::Zilla' => '0',
110 'Dist::Zilla::MVP::Section' => '0',
111 'ExtUtils::MakeMaker' => '0',
112 'File::Copy::Recursive' => '0',
113 'File::Spec' => '0',
114 'FindBin' => '0',
115 'Moose' => '0',
116 'Test::More' => '0',
117 'perl' => '5.006'
118 }
119 }
120 };
121 $x;
122 }
+0
-183
t/00-report-prereqs.t less more
0 #!perl
1
2 use strict;
3 use warnings;
4
5 # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.025
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 && (my $meta = eval { CPAN::Meta->load_file($source) } )
82 ) {
83 $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs);
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
-12
xt/author/critic.t less more
0 #!perl
1
2 use strict;
3 use warnings;
4
5 use Test::More;
6 use English qw(-no_match_vars);
7
8 eval "use Test::Perl::Critic";
9 plan skip_all => 'Test::Perl::Critic required to criticise code' if $@;
10 Test::Perl::Critic->import( -profile => "perlcritic.rc" ) if -e "perlcritic.rc";
11 all_critic_ok();
+0
-20
xt/author/eol.t less more
0 use strict;
1 use warnings;
2
3 # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.19
4
5 use Test::More 0.88;
6 use Test::EOL;
7
8 my @files = (
9 'lib/Dist/Zilla/Role/Bootstrap.pm',
10 't/00-compile/lib_Dist_Zilla_Role_Bootstrap_pm.t',
11 't/00-report-prereqs.dd',
12 't/00-report-prereqs.t',
13 't/01-basic.t',
14 't/02-try-built-mtime.t',
15 't/03-try-built-parseversion.t'
16 );
17
18 eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files;
19 done_testing;
+0
-7
xt/author/pod-coverage.t less more
0 #!perl
1 # This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests.
2
3 use Test::Pod::Coverage 1.08;
4 use Pod::Coverage::TrustPod;
5
6 all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' });
+0
-7
xt/author/pod-syntax.t less more
0 #!perl
1 # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
2 use strict; use warnings;
3 use Test::More;
4 use Test::Pod 1.41;
5
6 all_pod_files_ok();
+0
-10
xt/release/cpan-changes.t less more
0 use strict;
1 use warnings;
2
3 # this test was generated with Dist::Zilla::Plugin::Test::CPAN::Changes 0.012
4
5 use Test::More 0.96 tests => 1;
6 use Test::CPAN::Changes;
7 subtest 'changes_ok' => sub {
8 changes_file_ok('Changes');
9 };
+0
-6
xt/release/distmeta.t less more
0 #!perl
1 # This file was automatically generated by Dist::Zilla::Plugin::MetaTests.
2
3 use Test::CPAN::Meta;
4
5 meta_yaml_ok();
+0
-9
xt/release/kwalitee.t less more
0 # this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.12
1 use strict;
2 use warnings;
3 use Test::More 0.88;
4 use Test::Kwalitee 1.21 'kwalitee_ok';
5
6 kwalitee_ok();
7
8 done_testing;
+0
-8
xt/release/minimum-version.t less more
0 #!perl
1
2 use Test::More;
3
4 eval "use Test::MinimumVersion";
5 plan skip_all => "Test::MinimumVersion required for testing minimum versions"
6 if $@;
7 all_minimum_version_from_metayml_ok();