| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# ---------------------------------------------------------------------- copyright and license --- |
|
2
|
|
|
|
|
|
|
# |
|
3
|
|
|
|
|
|
|
# file: lib/Dist/Zilla/Plugin/Hook.pm |
|
4
|
|
|
|
|
|
|
# |
|
5
|
|
|
|
|
|
|
# Copyright © 2015, 2016 Van de Bugger |
|
6
|
|
|
|
|
|
|
# |
|
7
|
|
|
|
|
|
|
# This file is part of perl-Dist-Zilla-Plugin-Hook. |
|
8
|
|
|
|
|
|
|
# |
|
9
|
|
|
|
|
|
|
# perl-Dist-Zilla-Plugin-Hook is free software: you can redistribute it and/or modify it under |
|
10
|
|
|
|
|
|
|
# the terms of the GNU General Public License as published by the Free Software Foundation, |
|
11
|
|
|
|
|
|
|
# either version 3 of the License, or (at your option) any later version. |
|
12
|
|
|
|
|
|
|
# |
|
13
|
|
|
|
|
|
|
# perl-Dist-Zilla-Plugin-Hook is distributed in the hope that it will be useful, but WITHOUT ANY |
|
14
|
|
|
|
|
|
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
|
15
|
|
|
|
|
|
|
# PURPOSE. See the GNU General Public License for more details. |
|
16
|
|
|
|
|
|
|
# |
|
17
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License along with |
|
18
|
|
|
|
|
|
|
# perl-Dist-Zilla-Plugin-Hook. If not, see <http://www.gnu.org/licenses/>. |
|
19
|
|
|
|
|
|
|
# |
|
20
|
|
|
|
|
|
|
# ---------------------------------------------------------------------- copyright and license --- |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
#pod =for :this This is C<Dist::Zilla::Plugin::Hook> module documentation. Read this if you are going to hack or |
|
23
|
|
|
|
|
|
|
#pod extend C<Dist-Zilla-Plugin-Hook>. |
|
24
|
|
|
|
|
|
|
#pod |
|
25
|
|
|
|
|
|
|
#pod =for :those If you want to write C<Dist::Zilla> plugin directly in F<dist.ini>, read the L<manual|Dist::Zilla::Plugin::Hook::Manual>. General |
|
26
|
|
|
|
|
|
|
#pod topics like getting source, building, installing, bug reporting and some others are covered in the |
|
27
|
|
|
|
|
|
|
#pod F<README>. |
|
28
|
|
|
|
|
|
|
#pod |
|
29
|
|
|
|
|
|
|
#pod =head1 DESCRIPTION |
|
30
|
|
|
|
|
|
|
#pod |
|
31
|
|
|
|
|
|
|
#pod This plugin consumes C<Hooker> role like all other C<Hook> plugins. However, this plugin I<never> |
|
32
|
|
|
|
|
|
|
#pod executes its Perl code. Instead, it just stores it for later use. As of today, only C<Hook> plugin |
|
33
|
|
|
|
|
|
|
#pod with C<prologue> name is actually used: |
|
34
|
|
|
|
|
|
|
#pod |
|
35
|
|
|
|
|
|
|
#pod [Hook/prologue] |
|
36
|
|
|
|
|
|
|
#pod . = use autodie ':all'; |
|
37
|
|
|
|
|
|
|
#pod |
|
38
|
|
|
|
|
|
|
#pod Such code will be executed just before each hook. Note again: C<Hook> itself does not execute its |
|
39
|
|
|
|
|
|
|
#pod code; if there are no other hooks in F<dist.ini>, this code will never execute. |
|
40
|
|
|
|
|
|
|
#pod |
|
41
|
|
|
|
|
|
|
#pod BTW, C<Dist::Zilla> and CPAN do not handle well distributions with no main module. This is also a |
|
42
|
|
|
|
|
|
|
#pod "main" module of C<Dist-Zilla-Plugin-Hook> distribution, to make C<Dist::Zilla> and C<CPAN> indexer happy. |
|
43
|
|
|
|
|
|
|
#pod |
|
44
|
|
|
|
|
|
|
#pod =head1 SEE ALSO |
|
45
|
|
|
|
|
|
|
#pod |
|
46
|
|
|
|
|
|
|
#pod =for :list |
|
47
|
|
|
|
|
|
|
#pod = L<Dist::Zilla> |
|
48
|
|
|
|
|
|
|
#pod = L<Dist::Zilla::Plugin::Hook::Manual> |
|
49
|
|
|
|
|
|
|
#pod = L<Dist::Zilla::Role::Hooker> |
|
50
|
|
|
|
|
|
|
#pod |
|
51
|
|
|
|
|
|
|
#pod =cut |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
package Dist::Zilla::Plugin::Hook; |
|
54
|
|
|
|
|
|
|
|
|
55
|
1
|
|
|
1
|
|
30524
|
use Moose; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
9
|
|
|
56
|
1
|
|
|
1
|
|
5455
|
use namespace::autoclean; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
11
|
|
|
57
|
1
|
|
|
1
|
|
81
|
use version 0.77; |
|
|
1
|
|
|
|
|
35
|
|
|
|
1
|
|
|
|
|
7
|
|
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
# ABSTRACT: Write C<Dist::Zilla> plugin directly in F<dist.ini> |
|
60
|
|
|
|
|
|
|
our $VERSION = 'v0.8.2_01'; # TRIAL VERSION |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::Plugin'; |
|
63
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::ErrorLogger' => { -version => 0.005 }; |
|
64
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::Hooker'; |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable(); |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
#pod =head1 COPYRIGHT AND LICENSE |
|
71
|
|
|
|
|
|
|
#pod |
|
72
|
|
|
|
|
|
|
#pod Copyright (C) 2015, 2016 Van de Bugger |
|
73
|
|
|
|
|
|
|
#pod |
|
74
|
|
|
|
|
|
|
#pod License GPLv3+: The GNU General Public License version 3 or later |
|
75
|
|
|
|
|
|
|
#pod <http://www.gnu.org/licenses/gpl-3.0.txt>. |
|
76
|
|
|
|
|
|
|
#pod |
|
77
|
|
|
|
|
|
|
#pod This is free software: you are free to change and redistribute it. There is |
|
78
|
|
|
|
|
|
|
#pod NO WARRANTY, to the extent permitted by law. |
|
79
|
|
|
|
|
|
|
#pod |
|
80
|
|
|
|
|
|
|
#pod |
|
81
|
|
|
|
|
|
|
#pod =cut |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------------------------ |
|
84
|
|
|
|
|
|
|
# |
|
85
|
|
|
|
|
|
|
# file: doc/what.pod |
|
86
|
|
|
|
|
|
|
# |
|
87
|
|
|
|
|
|
|
# This file is part of perl-Dist-Zilla-Plugin-Hook. |
|
88
|
|
|
|
|
|
|
# |
|
89
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------------------------ |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
#pod =encoding UTF-8 |
|
92
|
|
|
|
|
|
|
#pod |
|
93
|
|
|
|
|
|
|
#pod =head1 WHAT? |
|
94
|
|
|
|
|
|
|
#pod |
|
95
|
|
|
|
|
|
|
#pod C<Dist-Zilla-Plugin-Hook> (or just C<Hook>) is a set of C<Dist-Zilla> plugins. Every plugin executes Perl |
|
96
|
|
|
|
|
|
|
#pod code inlined into F<dist.ini> at particular stage of build process. |
|
97
|
|
|
|
|
|
|
#pod |
|
98
|
|
|
|
|
|
|
#pod =cut |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
# end of file # |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
# end of file # |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
__END__ |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=pod |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=encoding UTF-8 |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 NAME |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
Dist::Zilla::Plugin::Hook - Write C<Dist::Zilla> plugin directly in F<dist.ini> |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head1 VERSION |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
Version v0.8.2_01, released on 2016-11-24 21:44 UTC. |
|
118
|
|
|
|
|
|
|
This is a B<trial release>. |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=head1 WHAT? |
|
121
|
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
C<Dist-Zilla-Plugin-Hook> (or just C<Hook>) is a set of C<Dist-Zilla> plugins. Every plugin executes Perl |
|
123
|
|
|
|
|
|
|
code inlined into F<dist.ini> at particular stage of build process. |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
This is C<Dist::Zilla::Plugin::Hook> module documentation. Read this if you are going to hack or |
|
126
|
|
|
|
|
|
|
extend C<Dist-Zilla-Plugin-Hook>. |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
If you want to write C<Dist::Zilla> plugin directly in F<dist.ini>, read the L<manual|Dist::Zilla::Plugin::Hook::Manual>. General |
|
129
|
|
|
|
|
|
|
topics like getting source, building, installing, bug reporting and some others are covered in the |
|
130
|
|
|
|
|
|
|
F<README>. |
|
131
|
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
133
|
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
This plugin consumes C<Hooker> role like all other C<Hook> plugins. However, this plugin I<never> |
|
135
|
|
|
|
|
|
|
executes its Perl code. Instead, it just stores it for later use. As of today, only C<Hook> plugin |
|
136
|
|
|
|
|
|
|
with C<prologue> name is actually used: |
|
137
|
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
[Hook/prologue] |
|
139
|
|
|
|
|
|
|
. = use autodie ':all'; |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
Such code will be executed just before each hook. Note again: C<Hook> itself does not execute its |
|
142
|
|
|
|
|
|
|
code; if there are no other hooks in F<dist.ini>, this code will never execute. |
|
143
|
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
BTW, C<Dist::Zilla> and CPAN do not handle well distributions with no main module. This is also a |
|
145
|
|
|
|
|
|
|
"main" module of C<Dist-Zilla-Plugin-Hook> distribution, to make C<Dist::Zilla> and C<CPAN> indexer happy. |
|
146
|
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
148
|
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
=over 4 |
|
150
|
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=item L<Dist::Zilla> |
|
152
|
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=item L<Dist::Zilla::Plugin::Hook::Manual> |
|
154
|
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=item L<Dist::Zilla::Role::Hooker> |
|
156
|
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=back |
|
158
|
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=head1 AUTHOR |
|
160
|
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
Van de Bugger <van.de.bugger@gmail.com> |
|
162
|
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
164
|
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
Copyright (C) 2015, 2016 Van de Bugger |
|
166
|
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
License GPLv3+: The GNU General Public License version 3 or later |
|
168
|
|
|
|
|
|
|
<http://www.gnu.org/licenses/gpl-3.0.txt>. |
|
169
|
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
This is free software: you are free to change and redistribute it. There is |
|
171
|
|
|
|
|
|
|
NO WARRANTY, to the extent permitted by law. |
|
172
|
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
=cut |