| 1 | package Dist::Zilla::Plugin::FakeRelease 6.040; | ||||||||||
| 2 | # ABSTRACT: fake plugin to test release | ||||||||||
| 3 | |||||||||||
| 4 | 7 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 7 | with 'Dist::Zilla::Role::Releaser'; | |||||||||
| 6 | |||||||||||
| 7 | 7 | ▶ | use Dist::Zilla::Pragmas; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 7 | ▶ | use namespace::autoclean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 7 | has user => ( | |||||||||
| 12 | is => 'ro', | ||||||||||
| 13 | isa => 'Str', | ||||||||||
| 14 | required => 1, | ||||||||||
| 15 | default => 'AUTHORID', | ||||||||||
| 16 | ); | ||||||||||
| 17 | |||||||||||
| 18 | 1 | ▶ | sub cpanid { shift->user } | ||||||||
|
Subroutine
cpanid: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 19 | |||||||||||
| 20 | 13 | ▶ | sub release { | ||||||||
|
Subroutine
release: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||
| 21 | 13 | my $self = shift; | |||||||||
| 22 | |||||||||||
| 23 | 13 | for my $env ( | |||||||||
| 24 | 'DIST_ZILLA_FAKERELEASE_FAIL', # old | ||||||||||
| 25 | 'DZIL_FAKERELEASE_FAIL', # new | ||||||||||
| 26 | ) { | ||||||||||
| 27 | 26 | ▶ | $self->log_fatal("$env set, aborting") if $ENV{$env}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 11 | $self->log('Fake release happening (nothing was really done)'); | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 7 | __PACKAGE__->meta->make_immutable; | |||||||||
| 34 | 7 | 1; | |||||||||
| 35 | |||||||||||
| 36 | #pod =head1 SYNOPSIS | ||||||||||
| 37 | #pod | ||||||||||
| 38 | #pod [FakeRelease] | ||||||||||
| 39 | #pod user = CPANAUTHORID ; # optional. | ||||||||||
| 40 | #pod | ||||||||||
| 41 | #pod =head1 DESCRIPTION | ||||||||||
| 42 | #pod | ||||||||||
| 43 | #pod This plugin is a L<Releaser|Dist::Zilla::Role::Releaser> that does nothing. It | ||||||||||
| 44 | #pod is directed to plugin authors, who may need a dumb release plugin to test their | ||||||||||
| 45 | #pod shiny plugin implementing L<BeforeRelease|Dist::Zilla::Role::BeforeRelease> | ||||||||||
| 46 | #pod and L<AfterRelease|Dist::Zilla::Role::AfterRelease>. | ||||||||||
| 47 | #pod | ||||||||||
| 48 | #pod When this plugin does the release, it will just log a message and finish. | ||||||||||
| 49 | #pod | ||||||||||
| 50 | #pod If you set the environment variable C<DZIL_FAKERELEASE_FAIL> to a true value, | ||||||||||
| 51 | #pod the plugin will die instead of doing nothing. This can be useful for | ||||||||||
| 52 | #pod authors wanting to test reliably that release failed. | ||||||||||
| 53 | #pod | ||||||||||
| 54 | #pod You can optionally provide the 'user' parameter, which defaults to 'AUTHORID', | ||||||||||
| 55 | #pod which will allow things that depend on this metadata | ||||||||||
| 56 | #pod ( Sometimes provided by L<UploadToCPAN|Dist::Zilla::Plugin::UploadToCPAN> ) to still work. | ||||||||||
| 57 | #pod ( For example: L<Dist::Zilla::Plugin::Twitter> ) | ||||||||||
| 58 | #pod | ||||||||||
| 59 | #pod =head1 SEE ALSO | ||||||||||
| 60 | #pod | ||||||||||
| 61 | #pod Core Dist::Zilla plugins: | ||||||||||
| 62 | #pod L<ConfirmRelease|Dist::Zilla::Plugin::ConfirmRelease>, | ||||||||||
| 63 | #pod L<UploadToCPAN|Dist::Zilla::Plugin::UploadToCPAN>. | ||||||||||
| 64 | #pod | ||||||||||
| 65 | |||||||||||
| 66 | __END__ | ||||||||||