line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# vim: ts=4 sts=4 sw=4 et: syntax=perl |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Copyright (c) 2020-2023 Sven Kirmess |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Permission to use, copy, modify, and distribute this software for any |
6
|
|
|
|
|
|
|
# purpose with or without fee is hereby granted, provided that the above |
7
|
|
|
|
|
|
|
# copyright notice and this permission notice appear in all copies. |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
10
|
|
|
|
|
|
|
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
11
|
|
|
|
|
|
|
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
12
|
|
|
|
|
|
|
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
13
|
|
|
|
|
|
|
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
14
|
|
|
|
|
|
|
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
15
|
|
|
|
|
|
|
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
16
|
|
|
|
|
|
|
|
17
|
2
|
|
|
2
|
|
1884
|
use 5.006; |
|
2
|
|
|
|
|
10
|
|
18
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
59
|
|
19
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
173
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
package Dist::Zilla::Plugin::Code::AfterBuild; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
our $VERSION = '0.008'; |
24
|
|
|
|
|
|
|
|
25
|
2
|
|
|
2
|
|
2304
|
use Moose; |
|
2
|
|
|
|
|
991910
|
|
|
2
|
|
|
|
|
13
|
|
26
|
2
|
|
|
2
|
|
17184
|
use namespace::autoclean; |
|
2
|
|
|
|
|
8376
|
|
|
2
|
|
|
|
|
14
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::AfterBuild'; |
29
|
|
|
|
|
|
|
|
30
|
2
|
|
|
2
|
|
2325
|
use Config::MVP 2.200012 (); # https://github.com/rjbs/Config-MVP/issues/13 |
|
2
|
|
|
|
|
327
|
|
|
2
|
|
|
|
|
63
|
|
31
|
2
|
|
|
2
|
|
1003
|
use MooseX::Types::Moose qw(CodeRef); |
|
2
|
|
|
|
|
137663
|
|
|
2
|
|
|
|
|
17
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
has after_build => ( |
34
|
|
|
|
|
|
|
is => 'ro', |
35
|
|
|
|
|
|
|
isa => 'CodeRef', |
36
|
|
|
|
|
|
|
reader => '_after_build', |
37
|
|
|
|
|
|
|
required => 1, |
38
|
|
|
|
|
|
|
); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub after_build { |
41
|
2
|
|
|
2
|
0
|
119094
|
my $self = shift; |
42
|
|
|
|
|
|
|
|
43
|
2
|
|
|
|
|
97
|
my $code_ref = $self->_after_build; |
44
|
2
|
|
|
|
|
13
|
return $self->$code_ref(@_); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
__END__ |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=pod |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=encoding UTF-8 |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 NAME |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Dist::Zilla::Plugin::Code::AfterBuild - something that runs after building is mostly complete |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 VERSION |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Version 0.008 |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 SYNOPSIS |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head2 Dist::Zilla::Role::PluginBundle |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
package Dist::Zilla::PluginBundle::MyBundle; |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
use Moose; |
72
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::PluginBundle'; |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub bundle_config { |
75
|
|
|
|
|
|
|
my ( $class, $section ) = @_; |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
my @plugins; |
78
|
|
|
|
|
|
|
push @plugins, [ |
79
|
|
|
|
|
|
|
'SomeUniqueName', |
80
|
|
|
|
|
|
|
'Dist::Zilla::Plugin::Code::AfterBuild', |
81
|
|
|
|
|
|
|
{ |
82
|
|
|
|
|
|
|
after_build => sub { |
83
|
|
|
|
|
|
|
my ( $self, $payload ) = @_; |
84
|
|
|
|
|
|
|
$self->log('Hello world'); |
85
|
|
|
|
|
|
|
}, |
86
|
|
|
|
|
|
|
}, |
87
|
|
|
|
|
|
|
]; |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
return @plugins; |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head2 Dist::Zilla::Role::PluginBundle::Easy |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
package Dist::Zilla::PluginBundle::MyBundle; |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
use Moose; |
97
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::PluginBundle::Easy'; |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
sub configure { |
100
|
|
|
|
|
|
|
my ( $self ) = @_; |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
$self->add_plugins([ |
103
|
|
|
|
|
|
|
'Code::AfterBuild', |
104
|
|
|
|
|
|
|
{ |
105
|
|
|
|
|
|
|
after_build => sub { |
106
|
|
|
|
|
|
|
my ( $self, $payload ) = @_; |
107
|
|
|
|
|
|
|
$self->log('Hello world'); |
108
|
|
|
|
|
|
|
}, |
109
|
|
|
|
|
|
|
}, |
110
|
|
|
|
|
|
|
]); |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
return; |
113
|
|
|
|
|
|
|
} |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head1 DESCRIPTION |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
This plugin implements the L<Dist::Zilla::Role::AfterBuild> role. |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head1 SUPPORT |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=head2 Bugs / Feature Requests |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Please report any bugs or feature requests through the issue tracker |
124
|
|
|
|
|
|
|
at L<https://github.com/skirmess/Dist-Zilla-Plugin-Code/issues>. |
125
|
|
|
|
|
|
|
You will be notified automatically of any progress on your issue. |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head2 Source Code |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
This is open source software. The code repository is available for |
130
|
|
|
|
|
|
|
public review and contribution under the terms of the license. |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
L<https://github.com/skirmess/Dist-Zilla-Plugin-Code> |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
git clone https://github.com/skirmess/Dist-Zilla-Plugin-Code.git |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=head1 AUTHOR |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
Sven Kirmess <sven.kirmess@kzone.ch> |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=head1 SEE ALSO |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
L<Dist::Zilla>, L<Dist::Zilla::Role::AfterBuild> |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=cut |