File Coverage

blib/lib/Dist/Zilla/PluginBundle/Author/ETHER.pm
Criterion Covered Total %
statement 70 71 98.5
branch 3 6 50.0
condition 1 9 11.1
subroutine 23 24 95.8
pod 0 3 0.0
total 97 113 85.8


line stmt bran cond sub pod time code
1 21     21   16726159 use strict;
  21         189  
  21         642  
2 21     21   120 use warnings;
  21         48  
  21         1592  
3             package Dist::Zilla::PluginBundle::Author::ETHER; # git description: v0.159-5-gda45ade
4             # vim: set ts=8 sts=2 sw=2 tw=100 et :
5             # ABSTRACT: A plugin bundle for distributions built by ETHER
6             # KEYWORDS: author bundle distribution tool
7              
8             our $VERSION = '0.160';
9              
10 21     21   1593 no if "$]" >= 5.031009, feature => 'indirect';
  21         127  
  21         233  
11 21     21   1157 no if "$]" >= 5.033001, feature => 'multidimensional';
  21         53  
  21         123  
12 21     21   1054 no if "$]" >= 5.033006, feature => 'bareword_filehandles';
  21         44  
  21         121  
13 21     21   9677 use Moose;
  21         5095749  
  21         171  
14             with
15             'Dist::Zilla::Role::PluginBundle::Easy',
16             'Dist::Zilla::Role::PluginBundle::PluginRemover' => { -version => '0.103' },
17             'Dist::Zilla::Role::PluginBundle::Config::Slicer';
18              
19 21     21   166343 use Dist::Zilla::Util;
  21         324586  
  21         866  
20 21     21   181 use Moose::Util::TypeConstraints qw(enum subtype where class_type);
  21         54  
  21         262  
21 21     21   17721 use List::Util 1.45 qw(first any uniq none);
  21         539  
  21         1842  
22 21     21   156 use Module::Runtime qw(require_module use_module);
  21         52  
  21         246  
23 21     21   12244 use Devel::CheckBin 'can_run';
  21         2093879  
  21         1567  
24 21     21   262 use Path::Tiny;
  21         55  
  21         1056  
25 21     21   12003 use CPAN::Meta 2.150006; # for x_* preservation
  21         595024  
  21         837  
26 21     21   277 use CPAN::Meta::Requirements;
  21         55  
  21         547  
27 21     21   12157 use Term::ANSIColor 'colored';
  21         146296  
  21         16604  
28             eval { +require Win32::Console::ANSI } if $^O eq 'MSWin32';
29 21     21   247 use Config;
  21         57  
  21         957  
30 21     21   146 use Try::Tiny;
  21         64  
  21         1513  
31 21     21   8545 use URI::Escape 'uri_escape';
  21         26157  
  21         1372  
32 21     21   7409 use namespace::autoclean;
  21         24700  
  21         128  
33              
34             sub mvp_multivalue_args { qw(installer copy_file_from_release) }
35              
36             # Note: no support yet for depending on a specific version of the plugin --
37             # but [PromptIfStale] generally makes that unnecessary
38             has installer => (
39             isa => 'ArrayRef[Str]',
40             init_arg => undef,
41             lazy => 1,
42             default => sub {
43             my $self = shift;
44              
45             return [ 'MakeMaker::Fallback', 'ModuleBuildTiny::Fallback' ]
46             if not exists $self->payload->{installer};
47              
48             # remove 'none' from installer list
49             return [ grep $_ ne 'none', @{ $self->payload->{installer} } ];
50             },
51             traits => ['Array'],
52             handles => { installer => 'elements' },
53             );
54              
55             has server => (
56             is => 'ro', isa => enum([qw(github gitmo p5sagit catagits none)]),
57             init_arg => undef,
58             lazy => 1,
59             default => sub { $_[0]->payload->{server} // 'github' },
60             );
61              
62             has bugtracker => (
63             is => 'ro', isa => enum([qw(rt github)]),
64             init_arg => undef,
65             lazy => 1,
66             default => sub {
67             my $bugtracker = $_[0]->payload->{bugtracker} // 'rt';
68             die 'bugtracker cannot be github unless server = github'
69             if $bugtracker eq 'github' and $_[0]->server ne 'github';
70             $bugtracker;
71             },
72             );
73              
74             has surgical_podweaver => (
75             is => 'ro', isa => 'Bool',
76             init_arg => undef,
77             lazy => 1,
78             default => sub { $_[0]->payload->{surgical_podweaver} // 0 },
79             );
80              
81             has airplane => (
82             is => 'ro', isa => 'Bool',
83             init_arg => undef,
84             lazy => 1,
85             default => sub { $ENV{DZIL_AIRPLANE} || $_[0]->payload->{airplane} // 0 },
86             );
87              
88             has copy_file_from_release => (
89             isa => 'ArrayRef[Str]',
90             init_arg => undef,
91             lazy => 1,
92             default => sub { $_[0]->payload->{copy_file_from_release} // [] },
93             traits => ['Array'],
94             handles => { copy_files_from_release => 'elements' },
95             );
96              
97             around copy_files_from_release => sub {
98             my $orig = shift; my $self = shift;
99             sort(uniq($self->$orig(@_),
100             qw(LICENCE LICENSE CONTRIBUTING ppport.h INSTALL),
101             $self->cpanfile ? 'cpanfile' : (),
102             ));
103             };
104              
105             sub commit_files_after_release {
106 40     40 0 362 grep -e, sort(uniq('README.md', 'README.pod', 'Changes', shift->copy_files_from_release));
107             }
108              
109             has changes_version_columns => (
110             is => 'ro', isa => subtype('Int', where { $_ > 0 && $_ < 20 }),
111             init_arg => undef,
112             lazy => 1,
113             default => sub { $_[0]->payload->{changes_version_columns} // 10 },
114             );
115              
116             has licence => (
117             is => 'ro', isa => 'Str',
118             init_arg => undef,
119             lazy => 1,
120             default => sub {
121             my $self = shift;
122             my $authority = $self->authority;
123             $self->payload->{licence}
124             // $self->payload->{license}
125             # licenSe is US-only; known non-American authors will be treated appropriately.
126             // ((any { $authority eq "cpan:$_" }
127             qw(ETHER ABERGMAN AVAR BINGOS BOBTFISH CHANSEN CHOLET DOHERTY FLORA GAAS GETTY GSAR ILMARI JAWNSY JQUELIN LBROCARD LEONT LLAP MANWAR MSTROUT NEILB NUFFIN OALDERS PERIGRIN PHAYLON RELEQUEST SALVA))
128             ? 'LICENCE' : 'LICENSE');
129             },
130             );
131              
132             has authority => (
133             is => 'ro', isa => 'Str',
134             init_arg => undef,
135             lazy => 1,
136             default => sub {
137             my $self = shift;
138              
139             # we could warn about this, but then we'd have to change configs (and bump prereqs) for an awful lot of
140             # distributions.
141             return $self->payload->{'Authority.authority'}
142             if exists $self->payload->{'Authority.authority'};
143              
144             $self->payload->{authority} // 'cpan:ETHER';
145             },
146             );
147              
148             has fake_release => (
149             is => 'ro', isa => 'Bool',
150             init_arg => undef,
151             lazy => 1,
152             default => sub { $ENV{FAKE_RELEASE} || $_[0]->payload->{fake_release} // 0 },
153             );
154              
155             has plugin_prereq_phase => (
156             is => 'ro',
157             isa => 'Str',
158             lazy => 1,
159             default => sub { $_[0]->payload->{plugin_prereq_phase} // 'x_Dist_Zilla' },
160             );
161              
162             has plugin_prereq_relationship => (
163             is => 'ro',
164             isa => 'Str',
165             lazy => 1,
166             default => sub { $_[0]->payload->{plugin_prereq_relationship} // 'requires' },
167             );
168              
169             has cpanfile => (
170             is => 'ro', isa => 'Bool',
171             init_arg => undef,
172             lazy => 1,
173             default => sub { $_[0]->payload->{cpanfile} // 0 },
174             );
175              
176             sub pause_cfg_file () { '.pause' }
177 0 0 0 0 0 0 sub pause_cfg_dir () { $^O eq 'MSWin32' && "$]" < 5.016 ? $ENV{HOME} || $ENV{USERPROFILE} : (<~>)[0] }
      0        
178              
179             my $_pause_config;
180             sub _pause_config {
181             return $_pause_config if $_pause_config;
182              
183             # stolen shamelessly from Dist::Zilla::Plugin::UploadToCPAN
184             my $self = shift;
185             require CPAN::Uploader;
186             my $file = $self->pause_cfg_file;
187             $file = File::Spec->catfile($self->pause_cfg_dir, $file)
188             unless File::Spec->file_name_is_absolute($file);
189             return {} unless -e $file && -r _;
190             my $cfg = try {
191             CPAN::Uploader->read_config_file($file)
192             } catch {
193             $self->log("Couldn't load credentials from '$file': $_");
194             {};
195             };
196             return $cfg;
197             }
198              
199             sub _pause_download_url {
200 40     40   151 my $self = shift;
201 40         144 my ($username, $password) = @{$self->_pause_config}{qw(user password)};
  40         543  
202 40 50 33     1788 return if not $username or not $password;
203 40         478 $password = uri_escape($password) =~ s/%/%%/gr;
204 40         2683 'http://'.$username.':'.$password.'@pause.perl.org/pub/PAUSE/authors/id/'.substr($username, 0, 1).'/'.substr($username,0,2).'/'.$username.'/%a';
205             }
206              
207             # configs are applied when plugins match ->isa($key) or ->does($key)
208             my %extra_args = (
209             'Dist::Zilla::Plugin::MakeMaker' => { 'eumm_version' => '0' },
210             'Dist::Zilla::Plugin::ModuleBuildTiny' => { ':version' => '0.012', version_method => 'conservative', static => 'auto' },
211             'Dist::Zilla::Plugin::MakeMaker::Fallback' => { ':version' => '0.029' },
212             # default_jobs is no-op until Dist::Zilla 5.014
213             'Dist::Zilla::Role::TestRunner' => { default_jobs => 9 },
214             'Dist::Zilla::Plugin::ModuleBuild' => { mb_version => '0.28' },
215             'Dist::Zilla::Plugin::ModuleBuildTiny::Fallback' => { ':version' => '0.018', version_method => 'conservative', static => 'auto' },
216             );
217              
218             # plugins that use the network when they run
219             sub _network_plugins {
220 5     5   3412495 qw(
221             PromptIfStale
222             Test::Pod::LinkCheck
223             Test::Pod::No404s
224             Git::Remote::Check
225             CheckPrereqsIndexed
226             CheckIssues
227             UploadToCPAN
228             Git::Push
229             );
230             }
231              
232             has _has_bash => (
233             is => 'ro',
234             isa => 'Bool',
235             lazy => 1,
236             default => sub { !!can_run('bash') },
237             );
238              
239             # note this is applied to the plugin list in Dist::Zilla::Role::PluginBundle::PluginRemover,
240             # but we also need to use it here to be sure we are not adding configs that are only needed
241             # by plugins that will be subsequently removed.
242             has _removed_plugins => (
243             isa => 'HashRef[Str]',
244             init_arg => undef,
245             lazy => 1,
246             default => sub {
247             my $self = shift;
248             my $remove = $self->payload->{ $self->plugin_remover_attribute } // [];
249             my %removed; @removed{@$remove} = (!!1) x @$remove;
250             \%removed;
251             },
252             traits => ['Hash'],
253             handles => { _plugin_removed => 'exists', _removed_plugins => 'keys' },
254             );
255              
256             # this attribute and its supporting code is a candidate to be extracted out into its own role,
257             # for re-use in other bundles
258             has _plugin_requirements => (
259             isa => class_type('CPAN::Meta::Requirements'),
260             lazy => 1,
261             default => sub { CPAN::Meta::Requirements->new },
262             handles => {
263             _add_minimum_plugin_requirement => 'add_minimum',
264             _plugin_requirements_as_string_hash => 'as_string_hash',
265             },
266             );
267              
268             # files that might be in the repository that should never be gathered
269             my @never_gather = grep -e, qw(
270             Makefile.PL ppport.h README.md README.pod META.json
271             cpanfile TODO CONTRIBUTING LICENCE LICENSE INSTALL
272             inc/ExtUtils/MakeMaker/Dist/Zilla/Develop.pm
273             );
274              
275             sub BUILD {
276 43     43 0 484211 my $self = shift;
277              
278 43 100       2292 if ($self->airplane) {
279 3         25 warn '[@Author::ETHER] ' . colored('building in airplane mode - plugins requiring the network are skipped, and releases are not permitted', 'yellow') . "\n";
280              
281             # doing this before running configure means we can be sure we update the removal list before
282             # our _removed_plugins attribute is built.
283 3         239 push @{ $self->payload->{ $self->plugin_remover_attribute } }, $self->_network_plugins;
  3         108  
284             }
285             }
286              
287             sub configure {
288             my $self = shift;
289              
290             warn '[DZ] Building with ', blessed($self), ' ', $VERSION, "...\n"
291             if not $INC{'Test/More.pm'};
292              
293             warn '[@Author::ETHER] no "bash" executable found; skipping Run::AfterBuild command to update .ackrc', "\n"
294             if not $INC{'Test/More.pm'} and not $self->_has_bash;
295              
296             # NOTE! since the working directory has not changed to $zilla->root yet
297             # (and in future versions of Dist::Zilla, it may never change...)
298             # if running this code via a different mechanism than dzil <command>, file
299             # operations may be looking at the wrong directory! Take this into
300             # consideration when running tests!
301              
302             my $has_xs = glob('*.xs') ? 1 : 0;
303             warn '[@Author::ETHER] XS-based distribution detected.', "\n" if $has_xs;
304             die '[@Author::ETHER] no Makefile.PL found in the repository root: this is not very nice for contributors!', "\n"
305             if $has_xs and not -e 'Makefile.PL';
306              
307             # check for a bin/ that should probably be renamed to script/
308             warn '[@Author::ETHER] ', colored('bin/ detected - should this be moved to script/, so its contents can be installed into $PATH?', 'bright_red'), "\n"
309             if -d 'bin' and any { $_ eq 'ModuleBuildTiny' } $self->installer;
310              
311             warn '[@Author::ETHER] ', colored('You are using [ModuleBuild] as an installer, WTF?!', 'bright_red'), "\n"
312             if any { $_->isa('Dist::Zilla::Plugin::ModuleBuild') }
313             map Dist::Zilla::Util->expand_config_package_name($_), $self->installer;
314              
315             # this is better than injecting a perl prereq for 5.008, to allow MBT to
316             # become more 5.006-compatible in the future without forcing the distribution to be re-released.
317             die 'Module::Build::Tiny should not be used in distributions that are targeting perl 5.006!'
318             if any { /ModuleBuildTiny/ } $self->installer
319             and (not exists $self->payload->{'Test::MinimumVersion.max_target_perl'}
320             or $self->payload->{'Test::MinimumVersion.max_target_perl'} < '5.008');
321              
322             warn '[@Author::ETHER] ', colored('.git is missing and META.json is present -- this looks like a CPAN download rather than a git repository. You should probably run '
323             . (-f 'Build.PL' ? 'perl Build.PL; ./Build' : 'perl Makefile.PL; make') . ' instead of using dzil commands!', 'yellow'), "\n"
324             if not -d '.git' and -f 'META.json' and not $self->_plugin_removed('Git::GatherDir');
325              
326             # only set x_static_install using auto mode for my own distributions
327             # (for all other distributions, set explicitly to on or off)
328             # Note that this is just the default; if a dist.ini changed these values, ConfigSlicer will apply it later
329             my $static_install_mode = $self->payload->{'StaticInstall.mode'} // 'auto';
330             my $static_install_dry_run = ($static_install_mode eq 'auto'
331             and $self->authority ne 'cpan:ETHER') ? 1 : 0;
332              
333             warn '[@Author::ETHER] ', colored('server = ' . $self->server
334             . ': recommend instead using server = github and GithubMeta.remote = '
335             . $self->server . ' with a read-only mirror', 'yellow'), "\n"
336             if $self->server ne 'github' and $self->server ne 'none';
337              
338             # method modifier will also apply default configs, compile plugin prereqs
339             $self->add_plugins(
340             # adding this first indicates the start of the bundle in x_Dist_Zilla metadata
341             [ 'Prereqs' => 'pluginbundle version' => {
342             '-phase' => 'develop', '-relationship' => 'recommends',
343             $self->meta->name => $self->VERSION,
344             } ],
345              
346             # VersionProvider
347             # see [@Git::VersionManager]
348              
349             # BeforeBuild
350             # [ 'EnsurePrereqsInstalled' ], # FIXME: use options to make this less annoying!
351             [ 'PromptIfStale' => 'stale modules, build' => { phase => 'build', module => [ $self->meta->name ] } ],
352              
353             # ExecFiles
354             (-d ($self->payload->{'ExecDir.dir'} // 'script') || any { /^ExecDir\./ } keys %{ $self->payload })
355             ? [ 'ExecDir' => { dir => 'script' } ] : (),
356              
357             # Finders
358             [ 'FileFinder::ByName' => Examples => { dir => 'examples' } ],
359              
360             # Gather Files
361             [ 'Git::GatherDir' => { ':version' => '2.016', @never_gather ? ( exclude_filename => \@never_gather) : () } ],
362              
363             qw(MetaYAML MetaJSON Readme Manifest),
364              
365             $self->cpanfile ? [ 'CPANFile' ] : (),
366              
367             [ 'License' => { ':version' => '5.038', filename => $self->licence } ],
368             [ 'GenerateFile::FromShareDir' => 'generate CONTRIBUTING' => { -dist => 'Dist-Zilla-PluginBundle-Author-ETHER', -filename => 'CONTRIBUTING', has_xs => $has_xs } ],
369             [ 'InstallGuide' => { ':version' => '1.200005' } ],
370              
371             [ 'Test::Compile' => { ':version' => '2.039', bail_out_on_fail => 1, xt_mode => 1,
372             script_finder => [qw(:PerlExecFiles @Author::ETHER/Examples)] } ],
373             [ 'Test::NoTabs' => { ':version' => '0.08', finder => [qw(:InstallModules :ExecFiles @Author::ETHER/Examples :TestFiles :ExtraTestFiles)] } ],
374             [ 'Test::EOL' => { ':version' => '0.17', finder => [qw(:InstallModules :ExecFiles @Author::ETHER/Examples :TestFiles :ExtraTestFiles)] } ],
375             'MetaTests',
376             [ 'Test::CPAN::Changes' => { ':version' => '0.012' } ],
377             'Test::ChangesHasContent',
378             [ 'Test::MinimumVersion' => { ':version' => '2.000010', max_target_perl => '5.006' } ],
379             [ 'PodSyntaxTests' => { ':version' => '5.040' } ],
380             [ 'PodCoverageTests' => { ':version' => '5.040' } ],
381             [ 'Test::PodSpelling' => { ':version' => '2.006003', stopwords => ['irc'], directories => [qw(examples lib script t xt)] } ],
382             #[Test::Pod::LinkCheck] many outstanding bugs
383             ($ENV{CONTINUOUS_INTEGRATION} ? () : [ 'Test::Pod::No404s' => { ':version' => '1.003' } ] ),
384             [ 'Test::Kwalitee' => { ':version' => '2.10', filename => 'xt/author/kwalitee.t' } ],
385             [ 'MojibakeTests' => { ':version' => '0.8' } ],
386             [ 'Test::ReportPrereqs' => { ':version' => '0.022', verify_prereqs => 1,
387             version_extractor => ( ( any { $_ ne 'MakeMaker' } $self->installer ) ? 'Module::Metadata' : 'ExtUtils::MakeMaker' ),
388             include => [ sort qw(autodie Encode File::Temp JSON::PP Module::Runtime Sub::Name YAML),
389             $self->_plugin_removed('PodCoverageTests') ? () : 'Pod::Coverage' ] } ],
390             [ 'Test::Portability' => { ':version' => '2.000007' } ],
391             [ 'Test::CleanNamespaces' => { ':version' => '0.006' } ],
392              
393              
394             # Munge Files
395             [ 'Git::Describe' => { ':version' => '0.004', on_package_line => 1 } ],
396             [
397             ($self->surgical_podweaver ? 'SurgicalPodWeaver' : 'PodWeaver') => {
398             $self->surgical_podweaver ? () : ( ':version' => '4.008' ),
399             -f 'weaver.ini' ? () : ( config_plugin => '@Author::ETHER' ),
400             replacer => 'replace_with_comment',
401             post_code_replacer => 'replace_with_nothing',
402             }
403             ],
404              
405             # Metadata
406             $self->server eq 'github' ? [ 'GithubMeta' => {
407             ':version' => '0.54',
408             homepage => 0,
409             issues => ($self->bugtracker eq 'github' ? 1 : 0),
410             } ] : (),
411             [ 'AutoMetaResources' => {
412             $self->bugtracker eq 'rt' ? ( 'bugtracker.rt' => 1 ) : (),
413             $self->server eq 'gitmo' ? ( 'repository.gitmo' => 1 )
414             : $self->server eq 'p5sagit' ? ( 'repository.p5sagit' => 1 )
415             : $self->server eq 'catagits' ? ( 'repository.catagits' => 1 )
416             : ()
417             } ],
418             [ 'Authority' => { ':version' => '1.009', authority => $self->authority, do_munging => 0 } ],
419             [ 'MetaNoIndex' => { directory => [ qw(t xt), grep -d, qw(inc local perl5 fatlib examples share corpus demo) ] } ],
420             [ 'MetaProvides::Package' => { ':version' => '1.15000002', finder => ':InstallModules', meta_noindex => 1, inherit_version => 0, inherit_missing => 0 } ],
421             'MetaConfig',
422             [ 'Keywords' => { ':version' => '0.004' } ],
423             ($Config{default_inc_excludes_dot} ? [ 'UseUnsafeInc' => { dot_in_INC => 0 } ] : ()),
424             # [Git::Contributors]
425             # [StaticInstall]
426              
427             # Register Prereqs
428             # (MakeMaker or other installer)
429             [ 'AutoPrereqs' => { ':version' => '5.038' } ],
430             [ 'Prereqs::AuthorDeps' => { ':version' => '0.006', phase => $self->plugin_prereq_phase, relation => $self->plugin_prereq_relationship } ],
431             [ 'MinimumPerl' => { ':version' => '1.006', configure_finder => ':NoFiles' } ],
432             ($self->surgical_podweaver ? [ 'Prereqs' => pod_weaving => {
433             '-phase' => $self->plugin_prereq_phase,
434             '-relationship' => $self->plugin_prereq_relationship,
435             'Dist::Zilla::Plugin::SurgicalPodWeaver' => 0
436             } ] : ()),
437              
438             # Install Tool (some are also Test Runners)
439             $self->installer, # options are set lower down, via %extra_args
440              
441             # we prefer this to run after other Register Prereqs plugins
442             [ 'Git::Contributors' => { ':version' => '0.029', order_by => 'commits' } ],
443              
444             # must appear after installers; also note that MBT::*'s static tweak is consequently adjusted, later
445             [ 'StaticInstall' => { ':version' => '0.005', mode => $static_install_mode, dry_run => $static_install_dry_run } ],
446              
447             # Test Runners (load after installers to avoid a rebuild)
448             [ 'RunExtraTests' => { ':version' => '0.024' } ],
449              
450             # After Build
451             'CheckSelfDependency',
452              
453             ( $self->_has_bash ?
454             [ 'Run::AfterBuild' => '.ackrc' => { ':version' => '0.038', quiet => 1, run => q{bash -c "test -e .ackrc && grep -q -- '--ignore-dir=.latest' .ackrc || echo '--ignore-dir=.latest' >> .ackrc; if [[ `dirname '%d'` != .build ]]; then test -e .ackrc && grep -q -- '--ignore-dir=%d' .ackrc || echo '--ignore-dir=%d' >> .ackrc; fi"} } ]
455             : ()),
456             [ 'Run::AfterBuild' => '.latest' => { ':version' => '0.041', quiet => 1, fatal_errors => 0, eval => q!if ('%d' =~ /^%n-[.[:xdigit:]]+$/) { unlink '.latest'; symlink '%d', '.latest'; }! } ],
457              
458              
459             # Before Release
460             [ 'CheckStrictVersion' => { decimal_only => 1 } ],
461             'CheckMetaResources',
462             'EnsureLatestPerl',
463             [ 'PromptIfStale' => 'stale modules, release' => { phase => 'release', check_all_plugins => 1, check_all_prereqs => 1 } ],
464              
465             # if in airplane mode, allow our uncommitted dist.ini edit which sets 'airplane = 1'
466             [ 'Git::Check' => 'initial check' => { allow_dirty => [ $self->airplane ? 'dist.ini' : '' ] } ],
467              
468             'Git::CheckFor::MergeConflicts',
469             [ 'Git::CheckFor::CorrectBranch' => { ':version' => '0.004', release_branch => 'master' } ],
470             [ 'Git::Remote::Check' => { branch => 'master', remote_branch => 'master' } ],
471             [ 'CheckPrereqsIndexed' => { ':version' => '0.019' } ],
472             'TestRelease',
473             [ 'Git::Check' => 'after tests' => { allow_dirty => [''] } ],
474             'CheckIssues',
475             # (ConfirmRelease)
476              
477             # Releaser
478             $self->fake_release
479             ? do { warn '[@Author::ETHER] ', colored('FAKE_RELEASE set - not uploading to CPAN', 'yellow'), "\n"; 'FakeRelease' }
480             : 'UploadToCPAN',
481              
482             # After Release
483             ( $self->licence eq 'LICENSE' && -e 'LICENCE' ?
484             [ 'Run::AfterRelease' => 'remove old LICENCE' => { ':version' => '0.038', quiet => 1, eval => q!unlink 'LICENCE'! } ]
485             : ()),
486             ( $self->licence eq 'LICENCE' && -e 'LICENSE' ?
487             [ 'Run::AfterRelease' => 'remove old LICENSE' => { ':version' => '0.038', quiet => 1, eval => q!unlink 'LICENSE'! } ]
488             : ()),
489             ( -e 'README.md' ?
490             [ 'Run::AfterRelease' => 'remove old READMEs' => { ':version' => '0.038', quiet => 1, eval => q!unlink 'README.md'! } ]
491             : ()),
492              
493             [ 'CopyFilesFromRelease' => 'copy generated files' => { filename => [ $self->copy_files_from_release ] } ],
494             [ 'ReadmeAnyFromPod' => { ':version' => '0.142180', type => 'pod', location => 'root', phase => 'release' } ],
495             );
496              
497             # plugins to do with calculating, munging, incrementing versions
498             $self->add_bundle('@Git::VersionManager' => {
499             # Take care! runtime-requires prereqs needs to be updated in dist.ini when this is changed.
500             ':version' => '0.007',
501              
502             'RewriteVersion::Transitional.:version' => 0.006,
503             'RewriteVersion::Transitional.global' => 1,
504             'RewriteVersion::Transitional.fallback_version_provider' => 'Git::NextVersion',
505             'RewriteVersion::Transitional.version_regexp' => '^v([\d._]+)(-TRIAL)?$',
506              
507             # for first Git::Commit
508             commit_files_after_release => [ $self->commit_files_after_release ],
509             # because of [Git::Check], only files copied from the release would be added -- there is nothing else
510             # hanging around in the current directory
511             'release snapshot.add_files_in' => ['.'],
512             'release snapshot.commit_msg' => '%N-%v%t%n%n%c',
513              
514             'Git::Tag.tag_message' => 'v%v%t',
515              
516             # if the caller set bump_only_matching_versions, then this global setting falls on the floor automatically
517             # because the bundle uses the non-Transitional plugin in that case.
518             'BumpVersionAfterRelease::Transitional.global' => 1,
519             'BumpVersionAfterRelease::Transitional.finder' => [ ':InstallModules' ], # removed :ExecFiles
520              
521             'NextRelease.:version' => '5.033',
522             'NextRelease.time_zone' => 'UTC',
523             'NextRelease.format' => '%-' . ($self->changes_version_columns - 2) . 'v %{yyyy-MM-dd HH:mm:ss\'Z\'}d%{ (TRIAL RELEASE)}T',
524              
525             # 0.003 and earlier uses develop-suggests unconditionally, so we need not specify a minimum version
526             # for the default case here.
527             plugin_prereq_phase => $self->plugin_prereq_phase,
528             plugin_prereq_relationship => $self->plugin_prereq_relationship,
529             });
530              
531             $self->add_plugins(
532             'Git::Push',
533             $self->server eq 'github' ? [ 'GitHub::Update' => { ':version' => '0.40', metacpan => 1 } ] : (),
534             );
535              
536             # install with an author-specific URL from PAUSE, so cpanm-reporter knows where to submit the report
537             # hopefully the file is available at this location soonish after release!
538             my $pause_download_url = $self->_pause_download_url;;
539             $self->add_plugins(
540             [ 'Run::AfterRelease' => 'install release' => {
541             ':version' => '0.031', fatal_errors => 0, run => 'cpanm '.$pause_download_url } ],
542             ) if $pause_download_url;
543              
544             # halt release after pre-release checks, but before ConfirmRelease
545             $self->add_plugins('BlockRelease') if $self->airplane;
546              
547             $self->add_plugins(
548             [ 'Run::AfterRelease' => 'release complete' => { ':version' => '0.038', quiet => 1, eval => [ qq{print "release complete!\\xa"} ] } ],
549             # listed late, to allow all other plugins which do BeforeRelease checks to run first.
550             'ConfirmRelease',
551             );
552              
553             # if ModuleBuildTiny(::*) is being used, disable its static option if
554             # [StaticInstall] is being run with mode=off or dry_run=1
555             if (($static_install_mode eq 'off' or $static_install_dry_run)
556             and any { /^ModuleBuildTiny/ } $self->installer) {
557             my $mbt = Dist::Zilla::Util->expand_config_package_name('ModuleBuildTiny');
558             my $mbt_spec = first { $_->[1] =~ /^$mbt/ } @{ $self->plugins };
559              
560             $mbt_spec->[-1]{static} = 'no';
561             }
562              
563             # add used plugins to desired prereq section
564             $self->add_plugins(
565             [ 'Prereqs' => 'prereqs for @Author::ETHER' => {
566             '-phase' => $self->plugin_prereq_phase,
567             '-relationship' => $self->plugin_prereq_relationship,
568             %{ $self->_plugin_requirements_as_string_hash } } ]
569             ) if $self->plugin_prereq_phase and $self->plugin_prereq_relationship;
570              
571             # listed last, to be sure we run at the very end of each phase
572             $self->add_plugins(
573             [ 'VerifyPhases' => 'PHASE VERIFICATION' => { ':version' => '0.015' } ]
574             ) if ($ENV{USER} // '') eq 'ether';
575             }
576              
577             # determine plugin prereqs, and apply default configs (respecting superclasses, roles)
578             around add_plugins => sub {
579             my ($orig, $self, @plugins) = @_;
580              
581             @plugins = grep {
582             my $plugin = $_;
583             my $plugin_package = Dist::Zilla::Util->expand_config_package_name($plugin->[0]);
584             none {
585             $plugin_package eq Dist::Zilla::Util->expand_config_package_name($_) # match by package name
586             or ($plugin->[1] and not ref $plugin->[1] and $plugin->[1] eq $_) # match by moniker
587             } $self->_removed_plugins
588             } map +(ref $_ ? $_ : [ $_ ]), @plugins;
589              
590             foreach my $plugin_spec (@plugins) {
591             # these should never be added as plugin prereqs
592             next if $plugin_spec->[0] eq 'BlockRelease' # temporary use during development
593             or $plugin_spec->[0] eq 'VerifyPhases'; # only used by ether, not others
594              
595             my $plugin = Dist::Zilla::Util->expand_config_package_name($plugin_spec->[0]);
596             require_module($plugin);
597              
598             push @$plugin_spec, {} if not ref $plugin_spec->[-1];
599             my $payload = $plugin_spec->[-1];
600              
601             foreach my $module (grep +($plugin->isa($_) or $plugin->does($_)), keys %extra_args) {
602             my %configs = %{ $extra_args{$module} }; # copy, not reference!
603              
604             # don't keep :version unless it matches the package exactly, but still respect the prereq
605             $self->_add_minimum_plugin_requirement($module => delete $configs{':version'})
606             if exists $configs{':version'} and $module ne $plugin;
607              
608             # we don't need to worry about overwriting the payload with defaults, as
609             # ConfigSlicer will copy them back over later on.
610             @{$payload}{keys %configs} = values %configs;
611             }
612              
613             # record prereq (and version) for later possible injection
614             # (Note: this depends on $CWD being equal to $zilla->root)
615             $self->_add_minimum_plugin_requirement($plugin => $payload->{':version'} // 0)
616             if not -f do { (my $filename = $plugin) =~ s{::}{/}g; $filename .= '.pm' };
617             }
618              
619             return $self->$orig(@plugins);
620             };
621              
622             around add_bundle => sub {
623             my ($orig, $self, $bundle, $payload) = @_;
624              
625             return if $self->_plugin_removed($bundle);
626              
627             my $package = Dist::Zilla::Util->expand_config_package_name($bundle);
628             &use_module(
629             $package,
630             $payload && $payload->{':version'} ? $payload->{':version'} : (),
631             );
632              
633             # default configs can be passed in directly - no need to consult %extra_args
634              
635             # record plugin prereq of bundle only, not its components (it should do that itself)
636             $self->_add_minimum_plugin_requirement($package => $payload->{':version'} // 0);
637              
638             # allow config slices to propagate down from the user
639             $payload = {
640             %$payload, # caller bundle's default settings for this bundle, passed to this sub
641             # custom configs from the user, which may override defaults
642             (map +($_ => $self->payload->{$_}), grep /^(.+?)\.(.+?)/, keys %{ $self->payload }),
643             };
644              
645             # allow the user to say -remove = <plugin added in subbundle>, but also do not override
646             # any removals that were passed into this sub directly.
647             push @{$payload->{-remove}}, @{ $self->payload->{ $self->plugin_remover_attribute } }
648             if $self->payload->{ $self->plugin_remover_attribute };
649              
650             return $self->$orig($bundle, $payload);
651             };
652              
653             __PACKAGE__->meta->make_immutable;
654              
655             __END__
656              
657             =pod
658              
659             =encoding UTF-8
660              
661             =head1 NAME
662              
663             Dist::Zilla::PluginBundle::Author::ETHER - A plugin bundle for distributions built by ETHER
664              
665             =head1 VERSION
666              
667             version 0.160
668              
669             =head1 SYNOPSIS
670              
671             In your F<dist.ini>:
672              
673             [@Author::ETHER]
674              
675             =head1 DESCRIPTION
676              
677             =for stopwords optimizations
678              
679             This is a L<Dist::Zilla> plugin bundle. It is I<very approximately> equal to the
680             following F<dist.ini> (following the preamble), minus some optimizations:
681              
682             [Prereqs / pluginbundle version]
683             -phase = develop
684             -relationship = recommends
685             Dist::Zilla::PluginBundle::Author::ETHER = <current installed version>
686              
687             ;;; BeforeBuild
688             [PromptIfStale / stale modules, build]
689             phase = build
690             module = Dist::Zilla::Plugin::Author::ETHER
691              
692              
693             ;;; ExecFiles
694             [ExecDir]
695             dir = script ; only if script dir exists
696              
697              
698             ;;; Finders
699             [FileFinder::ByName / Examples]
700             dir = examples
701              
702              
703             ;;; Gather Files
704             [Git::GatherDir]
705             :version = 2.016
706             exclude_filename = CONTRIBUTING
707             exclude_filename = INSTALL
708             exclude_filename = LICENCE
709             exclude_filename = LICENSE
710             exclude_filename = META.json
711             exclude_filename = Makefile.PL
712             exclude_filename = README.md
713             exclude_filename = README.pod
714             exclude_filename = TODO
715             exclude_filename = cpanfile
716             exclude_filename = inc/ExtUtils/MakeMaker/Dist/Zilla/Develop.pm
717             exclude_filename = ppport.h
718              
719             [MetaYAML]
720             [MetaJSON]
721             [Readme]
722             [Manifest]
723             [License]
724             :version = 5.038
725             filename = LICENCE ; for distributions where I have authority
726              
727             [CPANFile] ; iff cpanfile = 1
728              
729             [GenerateFile::FromShareDir / generate CONTRIBUTING]
730             -dist = Dist-Zilla-PluginBundle-Author-ETHER
731             -filename = CONTRIBUTING
732             has_xs = <dynamically-determined flag>
733             [InstallGuide]
734             :version = 1.200005
735              
736             [Test::Compile]
737             :version = 2.039
738             bail_out_on_fail = 1
739             xt_mode = 1
740             script_finder = :PerlExecFiles
741             script_finder = Examples
742              
743             [Test::NoTabs]
744             :version = 0.08
745             finder = :InstallModules
746             finder = :ExecFiles
747             finder = Examples
748             finder = :TestFiles
749             finder = :ExtraTestFiles
750              
751             [Test::EOL]
752             :version = 0.17
753             finder = :InstallModules
754             finder = :ExecFiles
755             finder = Examples
756             finder = :TestFiles
757             finder = :ExtraTestFiles
758              
759             [MetaTests]
760             [Test::CPAN::Changes]
761             :version = 0.012
762             [Test::ChangesHasContent]
763             [Test::MinimumVersion]
764             :version = 2.000010
765             max_target_perl = 5.006
766             [PodSyntaxTests]
767             :version = 5.040
768             [PodCoverageTests]
769             :version = 5.040
770             [Test::PodSpelling]
771             :version = 2.006003
772             stopwords = irc
773             directory = examples
774             directory = lib
775             directory = script
776             directory = t
777             directory = xt
778              
779             ;[Test::Pod::LinkCheck] many outstanding bugs
780             [Test::Pod::No404s]
781             :version = 1.003
782             [Test::Kwalitee]
783             :version = 2.10
784             filename = xt/author/kwalitee.t
785             [MojibakeTests]
786             :version = 0.8
787             [Test::ReportPrereqs]
788             :version = 0.022
789             verify_prereqs = 1
790             version_extractor = Module::Metadata
791             include = Encode
792             include = File::Temp
793             include = JSON::PP
794             include = Module::Runtime
795             include = Pod::Coverage
796             include = Sub::Name
797             include = YAML
798             include = autodie
799             [Test::Portability]
800             :version = 2.000007
801             [Test::CleanNamespaces]
802             :version = 0.006
803              
804              
805             ;;; Munge Files
806             [Git::Describe]
807             :version = 0.004
808             on_package_line = 1
809              
810             [PodWeaver] (or [SurgicalPodWeaver])
811             :version = 4.008
812             config_plugin = @Author::ETHER ; unless weaver.ini is present
813             replacer = replace_with_comment
814             post_code_replacer = replace_with_nothing
815              
816              
817             ;;; Metadata
818             [GithubMeta] ; (if server = 'github' or omitted)
819             :version = 0.54
820             homepage = 0
821             issues = 0
822              
823             [AutoMetaResources]
824             bugtracker.rt = 1 ; (if issues = 'rt' or omitted)
825             ; (plus repository.* = 1 if server = 'gitmo' or 'p5sagit')
826              
827             [Authority]
828             :version = 1.009
829             authority = cpan:ETHER
830             do_munging = 0
831              
832             [MetaNoIndex]
833             directory = corpus
834             directory = demo
835             directory = examples
836             directory = fatlib
837             directory = inc
838             directory = local
839             directory = perl5
840             directory = share
841             directory = t
842             directory = xt
843              
844             [MetaProvides::Package]
845             :version = 1.15000002
846             finder = :InstallModules
847             meta_noindex = 1
848             inherit_version = 0
849             inherit_missing = 0
850              
851             [MetaConfig]
852             [Keywords]
853             :version = 0.004
854              
855             ; if we are releasing with a new perl with -DDEFAULT_INC_EXCLUDES_DOT set
856             [UseUnsafeInc]
857             dot_in_INC = 0
858              
859             ;[Git::Contributors] ; below
860             ;[StaticInstall] ; below
861              
862              
863             ;;; Register Prereqs
864             [AutoPrereqs]
865             :version = 5.038
866             [Prereqs::AuthorDeps]
867             phase = x_Dist_Zilla ; (or whatever 'plugin_prereq_phase' is set to)
868             relation = requires ; (or whatever 'plugin_prereq_relationship' is set to)
869             [MinimumPerl]
870             :version = 1.006
871             configure_finder = :NoFiles
872              
873             [Prereqs / prereqs for @Author::ETHER]
874             -phase = x_Dist_Zilla ; (or whatever 'plugin_prereq_phase' is set to)
875             -relationship = requires ; (or whatever 'plugin_prereq_relationship' is set to)
876             ...all the plugins this bundle uses...
877              
878              
879             ;;; Install Tool
880             ; <specified installer(s)>
881              
882             [Git::Contributors]
883             :version = 0.029
884             order_by = commits
885              
886             [StaticInstall]
887             :version = 0.005
888             mode = auto
889             dry_run = 1 ; only if authority is not ETHER
890              
891              
892             ;;; Test Runner
893             ; <specified installer(s)>
894             [RunExtraTests]
895             :version = 0.024
896             default_jobs = 9
897              
898              
899             ;;; After Build
900             [CheckSelfDependency]
901              
902             [Run::AfterBuild / .ackrc]
903             :version = 0.038
904             quiet = 1
905             run = bash -c "test -e .ackrc && grep -q -- '--ignore-dir=.latest' .ackrc || echo '--ignore-dir=.latest' >> .ackrc; if [[ `dirname '%d'` != .build ]]; then test -e .ackrc && grep -q -- '--ignore-dir=%d' .ackrc || echo '--ignore-dir=%d' >> .ackrc; fi"
906             [Run::AfterBuild / .latest]
907             :version = 0.041
908             quiet = 1
909             fatal_errors = 0
910             eval = if ('%d' =~ /^%n-[.[:xdigit:]]+$/) { unlink '.latest'; symlink '%d', '.latest'; }
911              
912              
913             ;;; Before Release
914             [CheckStrictVersion]
915             decimal_only = 1
916              
917             [CheckMetaResources]
918             [EnsureLatestPerl]
919             [PromptIfStale / stale modules, release]
920             phase = release
921             check_all_plugins = 1
922             check_all_prereqs = 1
923              
924             [Git::Check / initial check]
925             allow_dirty =
926              
927             [Git::CheckFor::MergeConflicts]
928              
929             [Git::CheckFor::CorrectBranch]
930             :version = 0.004
931             release_branch = master
932              
933             [Git::Remote::Check]
934             branch = master
935             remote_branch = master
936              
937             [CheckPrereqsIndexed]
938             :version = 0.019
939             [TestRelease]
940             [Git::Check / after tests]
941             allow_dirty =
942             [CheckIssues]
943             ;(ConfirmRelease)
944              
945              
946             ;;; Releaser
947             [UploadToCPAN]
948              
949              
950             ;;; AfterRelease
951             [Run::AfterRelease / remove old LICENCE] ; if switching from LICENCE -> LICENSE
952             :version = 0.038
953             quiet = 1
954             eval = unlink 'LICENCE'
955              
956             [Run::AfterRelease / remove old LICENSE] ; if switching from LICENSE -> LICENCE
957             :version = 0.038
958             quiet = 1
959             eval = unlink 'LICENSE'
960              
961             [Run::AfterRelease / remove old READMEs]
962             :version = 0.038
963             quiet = 1
964             eval = unlink 'README.md'
965              
966             [CopyFilesFromRelease / copy generated files]
967             filename = CONTRIBUTING
968             filename = INSTALL
969             filename = LICENCE
970             filename = LICENSE
971             filename = ppport.h
972             filename = cpanfile ; iff cpanfile = 1
973              
974             [ReadmeAnyFromPod]
975             :version = 0.142180
976             type = pod
977             location = root
978             phase = release
979              
980             ;;;;;; begin [@Git::VersionManager]
981              
982             ; this is actually a VersionProvider and FileMunger
983             [RewriteVersion::Transitional]
984             :version = 0.004
985             global = 1
986             fallback_version_provider = Git::NextVersion
987             version_regexp = ^v([\d._]+)(-TRIAL)?$
988              
989             [CopyFilesFromRelease / copy Changes]
990             filename = Changes
991              
992             [Git::Commit / release snapshot]
993             :version = 2.020
994             add_files_in = .
995             allow_dirty = CONTRIBUTING
996             allow_dirty = Changes
997             allow_dirty = INSTALL
998             allow_dirty = LICENCE
999             allow_dirty = LICENSE
1000             allow_dirty = README.md
1001             allow_dirty = README.pod
1002             allow_dirty = cpanfile ; iff cpanfile = 1
1003             allow_dirty = ppport.h
1004             commit_msg = %N-%v%t%n%n%c
1005              
1006             [Git::Tag]
1007             tag_message = v%v%t
1008              
1009             [BumpVersionAfterRelease::Transitional]
1010             :version = 0.004
1011             global = 1
1012             finder = :InstallModules ; removed :ExecFiles
1013              
1014             [NextRelease]
1015             :version = 5.033
1016             time_zone = UTC
1017             format = %-8v %{yyyy-MM-dd HH:mm:ss'Z'}d%{ (TRIAL RELEASE)}T
1018              
1019             [Git::Commit / post-release commit]
1020             :version = 2.020
1021             allow_dirty = Changes
1022             allow_dirty_match = ^lib/.*\.pm$
1023             commit_msg = increment $VERSION after %v release
1024              
1025             ;;;;;; end [@Git::VersionManager]
1026              
1027             [Git::Push]
1028              
1029             [GitHub::Update] ; (if server = 'github' or omitted)
1030             :version = 0.40
1031             metacpan = 1
1032              
1033             [Run::AfterRelease / install release]
1034             :version = 0.031
1035             fatal_errors = 0
1036             run = cpanm http://URMOM:mysekritpassword@pause.perl.org/pub/PAUSE/authors/id/U/UR/URMOM/%a
1037              
1038             [Run::AfterRelease / release complete]
1039             :version = 0.038
1040             quiet = 1
1041             eval = print "release complete!\xa"
1042              
1043             ; listed late, to allow all other plugins which do BeforeRelease checks to run first.
1044             [ConfirmRelease]
1045              
1046             ; listed last, to be sure we run at the very end of each phase
1047             ; only performed if $ENV{USER} eq 'ether'
1048             [VerifyPhases / PHASE VERIFICATION]
1049             :version = 0.015
1050              
1051             =for Pod::Coverage configure mvp_multivalue_args
1052              
1053             =for stopwords metacpan
1054              
1055             The distribution's code is assumed to be hosted at L<github|http://github.com>;
1056             L<RT|http://rt.cpan.org> is used as the issue tracker (see option L</rt> below).
1057             The home page in the metadata points to L<github|http://github.com>,
1058             while the home page on L<github|http://github.com> is updated on release to
1059             point to L<metacpan|http://metacpan.org>.
1060             The version and other metadata is derived directly from the local git repository.
1061              
1062             =head1 OPTIONS / OVERRIDES
1063              
1064             =head2 version
1065              
1066             Use C<< V=<version> >> in the shell to override the version of the distribution being built;
1067             otherwise the version is incremented after each release, in the F<*.pm> files.
1068              
1069             =head2 pod coverage
1070              
1071             Subroutines can be considered "covered" for pod coverage tests by adding a
1072             directive to pod (as many as you'd like),
1073             as described in L<Pod::Coverage::TrustPod>:
1074              
1075             =for Pod::Coverage foo bar baz
1076              
1077             =head2 spelling stopwords
1078              
1079             =for stopwords Stopwords
1080              
1081             Stopwords for spelling tests can be added by adding a directive to pod (as
1082             many as you'd like), as described in L<Pod::Spell/ADDING STOPWORDS>:
1083              
1084             =for stopwords foo bar baz
1085              
1086             See also L<[Test::PodSpelling]|Dist::Zilla::Plugin::Test::PodSpelling/stopwords>.
1087              
1088             =head2 installer
1089              
1090             =for stopwords ModuleBuildTiny
1091              
1092             Available since version 0.007.
1093              
1094             The installer back-end(s) to use (can be specified more than once); defaults
1095             to L<C<ModuleBuildTiny::Fallback>|Dist::Zilla::Plugin::ModuleBuildTiny::Fallback>
1096             and L<C<MakeMaker::Fallback>|Dist::Zilla::Plugin::MakeMaker::Fallback>
1097             (which generates a F<Build.PL> for normal use with no-configure-requires
1098             protection, and F<Makefile.PL> as a fallback, containing an upgrade warning).
1099             For toolchain-grade modules, you should only use F<Makefile.PL>-generating installers.
1100              
1101             You can select other backends (by plugin name, without the C<[]>), with the
1102             C<installer> option, or C<none> if you are supplying your own, as a separate
1103             plugin(s).
1104              
1105             Encouraged choices are:
1106              
1107             =over 4
1108              
1109             =item *
1110              
1111             C<< installer = ModuleBuildTiny >>
1112              
1113             =item *
1114              
1115             C<< installer = MakeMaker >>
1116              
1117             =item *
1118              
1119             C<< installer = MakeMaker::Fallback >> (when used in combination with ModuleBuildTiny)
1120              
1121             =item *
1122              
1123             C<< installer = =inc::Foo >> (if no configs are needed for this plugin; e.g. subclassed from L<[MakeMaker::Awesome]|Dist::Zilla::Plugin::MakeMaker::Awesome>)
1124              
1125             =item *
1126              
1127             C<< installer = none >> (if you are providing your own elsewhere in the file, with configs)
1128              
1129             =back
1130              
1131             =head2 server
1132              
1133             Available since version 0.019.
1134              
1135             If provided, must be one of:
1136              
1137             =over 4
1138              
1139             =item *
1140              
1141             C<github>
1142              
1143             (default)
1144             metadata and release plugins are tailored to L<github|http://github.com>.
1145              
1146             =item *
1147              
1148             C<gitmo>
1149              
1150             metadata and release plugins are tailored to
1151             L<gitmo@git.moose.perl.org|http://git.moose.perl.org>.
1152              
1153             =item *
1154              
1155             C<p5sagit>
1156              
1157             metadata and release plugins are tailored to
1158             L<p5sagit@git.shadowcat.co.uk|http://git.shadowcat.co.uk>.
1159              
1160             =item *
1161              
1162             C<catagits>
1163              
1164             metadata and release plugins are tailored to
1165             L<catagits@git.shadowcat.co.uk|http://git.shadowcat.co.uk>.
1166              
1167             =item *
1168              
1169             C<none>
1170              
1171             no special configuration of metadata (relating to repositories etc) is done --
1172             you'll need to provide this yourself.
1173              
1174             =back
1175              
1176             =head2 airplane
1177              
1178             Available since version 0.053.
1179              
1180             A boolean option that, when set, removes the use of all plugins that use the
1181             network (generally for comparing metadata against PAUSE, and querying the
1182             remote git server), as well as blocking the use of the C<release> command.
1183             Defaults to false; can also be set with the environment variable C<DZIL_AIRPLANE>.
1184              
1185             =head2 copy_file_from_release
1186              
1187             Available in this form since version 0.076.
1188              
1189             A file, to be present in the build, which is copied back to the source
1190             repository at release time and committed to git. Can be used more than
1191             once. Defaults to:
1192             F<LICENCE>, F<LICENSE>, F<CONTRIBUTING>, F<Changes>, F<ppport.h>, F<INSTALL>,
1193             as well as F<cpanfile> if C<cpanfile = 1> is specified in the options;
1194             defaults are appended to, rather than overwritten.
1195              
1196             =head2 surgical_podweaver
1197              
1198             =for stopwords PodWeaver SurgicalPodWeaver
1199              
1200             Available since version 0.051.
1201              
1202             A boolean option that, when set, uses
1203             L<[SurgicalPodWeaver]|Dist::Zilla::Plugin::SurgicalPodWeaver> instead of
1204             L<[PodWeaver]|Dist::Zilla::Plugin::SurgicalPodWeaver>, but with all the same
1205             options. Defaults to false.
1206              
1207             =head2 changes_version_columns
1208              
1209             Available since version 0.076.
1210              
1211             An integer that specifies how many columns (right-padded with whitespace) are
1212             allocated in F<Changes> entries to the version string. Defaults to 10.
1213              
1214             =head2 licence (or license)
1215              
1216             Available since version 0.101.
1217              
1218             A string that specifies the name to use for the licence file. Defaults to
1219             C<LICENCE> for distributions where I (ETHER) or any other known non-Americans
1220             have first-come permissions, or C<LICENSE> otherwise.
1221             (The pod section for legal information is also adjusted appropriately.)
1222              
1223             =head2 authority
1224              
1225             Available since version 0.117.
1226              
1227             A string of the form C<cpan:PAUSEID> that references the PAUSE ID of the user who has primary ("first-come")
1228             authority over the distribution and main module namespace. If not provided, it is extracted from the configuration
1229             passed through to the L<[Authority]|Dist::Zilla::Plugin::Authority> plugin, and finally defaults to C<cpan:ETHER>.
1230             It is presently used for setting C<x_authority> metadata and deciding which spelling is used for the F<LICENCE>
1231             file (if the C<licence> configuration is not provided).
1232              
1233             =head2 fake_release
1234              
1235             =for stopwords UploadToCPAN FakeRelease
1236              
1237             Available since version 0.122.
1238              
1239             A boolean option that, when set, removes L<[UploadToCPAN]|Dist::Zilla::Plugin::UploadToCPAN> from the plugin list
1240             and replaces it with L<[FakeRelease]|Dist::Zilla::Plugin::FakeRelease>.
1241             Defaults to false; can also be set with the environment variable C<FAKE_RELEASE>.
1242              
1243             =head2 plugin_prereq_phase, plugin_prereq_relationship
1244              
1245             If these are set, then plugins used by the bundle (with minimum version requirements) are injected into the
1246             distribution's prerequisites at the specified phase and relationship. Defaults to C<x_Dist_Zilla> and C<requires>.
1247             Disable with:
1248              
1249             plugin_prereq_phase =
1250             plugin_prereq_relationship =
1251              
1252             Available since version 0.133.
1253              
1254             =for stopwords cpanfile
1255              
1256             =head2 cpanfile
1257              
1258             Available since version 0.147.
1259              
1260             A boolean option that, when set, adds a F<cpanfile> to the built distribution and also commits it to the local
1261             repository after release. Beware that if the distribution has C<< dynamic_config => 1 >> in metadata, this will
1262             I<not> be a complete list of prerequisites.
1263              
1264             =head2 bugtracker
1265              
1266             Available since version 0.154.
1267              
1268             When set to C<rt> or omitted, L<RT|http://rt.cpan.org> is used as the bug/issue tracker. Can also be set to
1269             C<github>, in which case GitHub issues are used as the bugtracker in distribution metadata.
1270              
1271             =for stopwords customizations
1272              
1273             =head2 other customizations
1274              
1275             This bundle makes use of L<Dist::Zilla::Role::PluginBundle::PluginRemover> and
1276             L<Dist::Zilla::Role::PluginBundle::Config::Slicer> to allow further customization.
1277             (Note that even though some overridden values are inspected in this class,
1278             they are still overlaid on top of whatever this bundle eventually decides to
1279             pass - so what is in the F<dist.ini> always trumps everything else.)
1280              
1281             Plugins are not loaded until they are actually needed, so it is possible to
1282             C<--force>-install this plugin bundle and C<-remove> some plugins that do not
1283             install or are otherwise problematic.
1284              
1285             If a F<weaver.ini> is present in the distribution, pod is woven using it;
1286             otherwise, the behaviour is as with a F<weaver.ini> containing the single line
1287             C<[@Author::ETHER]> (see L<Pod::Weaver::PluginBundle::Author::ETHER>).
1288              
1289             =head1 NAMING SCHEME
1290              
1291             =for stopwords KENTNL
1292              
1293             This distribution follows best practices for author-oriented plugin bundles; for more information,
1294             see L<KENTNL's distribution|Dist::Zilla::PluginBundle::Author::KENTNL/NAMING-SCHEME>.
1295              
1296             =head1 SEE ALSO
1297              
1298             =over 4
1299              
1300             =item *
1301              
1302             L<Pod::Weaver::PluginBundle::Author::ETHER>
1303              
1304             =item *
1305              
1306             L<Dist::Zilla::MintingProfile::Author::ETHER>
1307              
1308             =item *
1309              
1310             L<Dist::Zilla::PluginBundle::Git::VersionManager>
1311              
1312             =back
1313              
1314             =head1 SUPPORT
1315              
1316             Bugs may be submitted through L<the RT bug tracker|https://rt.cpan.org/Public/Dist/Display.html?Name=Dist-Zilla-PluginBundle-Author-ETHER>
1317             (or L<bug-Dist-Zilla-PluginBundle-Author-ETHER@rt.cpan.org|mailto:bug-Dist-Zilla-PluginBundle-Author-ETHER@rt.cpan.org>).
1318              
1319             There is also a mailing list available for users of this distribution, at
1320             L<http://dzil.org/#mailing-list>.
1321              
1322             There is also an irc channel available for users of this distribution, at
1323             L<C<#distzilla> on C<irc.perl.org>|irc://irc.perl.org/#distzilla>.
1324              
1325             I am also usually active on irc, as 'ether' at C<irc.perl.org> and C<irc.freenode.org>.
1326              
1327             =head1 AUTHOR
1328              
1329             Karen Etheridge <ether@cpan.org>
1330              
1331             =head1 CONTRIBUTORS
1332              
1333             =for stopwords Dave Rolsky Edward Betts Graham Knop Randy Stauner Roy Ivy III Сергей Романов
1334              
1335             =over 4
1336              
1337             =item *
1338              
1339             Dave Rolsky <autarch@urth.org>
1340              
1341             =item *
1342              
1343             Edward Betts <edward@4angle.com>
1344              
1345             =item *
1346              
1347             Graham Knop <haarg@haarg.org>
1348              
1349             =item *
1350              
1351             Randy Stauner <rwstauner@cpan.org>
1352              
1353             =item *
1354              
1355             Roy Ivy III <rivy@cpan.org>
1356              
1357             =item *
1358              
1359             Сергей Романов <sromanov@cpan.org>
1360              
1361             =back
1362              
1363             =head1 COPYRIGHT AND LICENCE
1364              
1365             This software is copyright (c) 2013 by Karen Etheridge.
1366              
1367             This is free software; you can redistribute it and/or modify it under
1368             the same terms as the Perl 5 programming language system itself.
1369              
1370             =cut