| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package App::SmokeBrew::Plugin; |
|
2
|
|
|
|
|
|
|
$App::SmokeBrew::Plugin::VERSION = '1.00'; |
|
3
|
|
|
|
|
|
|
#ABSTRACT: A Moose role for smokebrew plugins |
|
4
|
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
1353
|
use strict; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
65
|
|
|
6
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
54
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
8
|
use Moose::Role; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
14
|
|
|
9
|
2
|
|
|
2
|
|
9149
|
use Moose::Util::TypeConstraints; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
16
|
|
|
10
|
2
|
|
|
2
|
|
3687
|
use MooseX::Types::Path::Class qw[Dir File]; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
19
|
|
|
11
|
2
|
|
|
2
|
|
3636
|
use MooseX::Types::Email qw[EmailAddress]; |
|
|
2
|
|
|
|
|
368091
|
|
|
|
2
|
|
|
|
|
42
|
|
|
12
|
2
|
|
|
2
|
|
3932
|
use App::SmokeBrew::Types qw[ArrayRefUri]; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
17
|
|
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
requires 'configure'; |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has 'builddir' => ( |
|
17
|
|
|
|
|
|
|
is => 'ro', |
|
18
|
|
|
|
|
|
|
isa => Dir, |
|
19
|
|
|
|
|
|
|
required => 1, |
|
20
|
|
|
|
|
|
|
coerce => 1, |
|
21
|
|
|
|
|
|
|
); |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
has 'prefix' => ( |
|
24
|
|
|
|
|
|
|
is => 'ro', |
|
25
|
|
|
|
|
|
|
isa => Dir, |
|
26
|
|
|
|
|
|
|
required => 1, |
|
27
|
|
|
|
|
|
|
coerce => 1, |
|
28
|
|
|
|
|
|
|
); |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
has 'perl_exe' => ( |
|
31
|
|
|
|
|
|
|
is => 'ro', |
|
32
|
|
|
|
|
|
|
isa => File, |
|
33
|
|
|
|
|
|
|
required => 1, |
|
34
|
|
|
|
|
|
|
coerce => 1, |
|
35
|
|
|
|
|
|
|
); |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
has 'mirrors' => ( |
|
38
|
|
|
|
|
|
|
is => 'ro', |
|
39
|
|
|
|
|
|
|
isa => 'ArrayRefUri', |
|
40
|
|
|
|
|
|
|
auto_deref => 1, |
|
41
|
|
|
|
|
|
|
required => 1, |
|
42
|
|
|
|
|
|
|
coerce => 1, |
|
43
|
|
|
|
|
|
|
); |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
has 'email' => ( |
|
46
|
|
|
|
|
|
|
is => 'ro', |
|
47
|
|
|
|
|
|
|
isa => EmailAddress, |
|
48
|
|
|
|
|
|
|
required => 1, |
|
49
|
|
|
|
|
|
|
); |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
has 'mx' => ( |
|
52
|
|
|
|
|
|
|
is => 'ro', |
|
53
|
|
|
|
|
|
|
isa => 'Str', |
|
54
|
|
|
|
|
|
|
); |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
has 'noclean' => ( |
|
57
|
|
|
|
|
|
|
is => 'ro', |
|
58
|
|
|
|
|
|
|
isa => 'Bool', |
|
59
|
|
|
|
|
|
|
default => 0, |
|
60
|
|
|
|
|
|
|
); |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
has 'verbose' => ( |
|
63
|
|
|
|
|
|
|
is => 'ro', |
|
64
|
|
|
|
|
|
|
isa => 'Bool', |
|
65
|
|
|
|
|
|
|
default => 0, |
|
66
|
|
|
|
|
|
|
); |
|
67
|
|
|
|
|
|
|
|
|
68
|
2
|
|
|
2
|
|
1906
|
no Moose::Role; |
|
|
2
|
|
|
|
|
16
|
|
|
|
2
|
|
|
|
|
47
|
|
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
qq[Smokin']; |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
__END__ |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=pod |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=encoding UTF-8 |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 NAME |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
App::SmokeBrew::Plugin - A Moose role for smokebrew plugins |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 VERSION |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
version 1.00 |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
package App::SmokeBrew::Plugin::Some::Plugin; |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
use Moose; |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
with 'App::SmokeBrew::Plugin'; |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
App::SmokeBrew::Plugin is a L<Moose> role that L<smokebrew> plugins must consume. |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
These are the attributes provided by the role and are expected by L<smokebrew>: |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=over |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=item C<email> |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
A required attribute, this must be a valid email address as constrained by L<MooseX::Types::Email> |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=item C<builddir> |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
A required attribute, this is the working directory where builds can take place. It will be coerced |
|
111
|
|
|
|
|
|
|
into a L<Path::Class::Dir> object by L<MooseX::Types::Path::Class>. |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=item C<prefix> |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
A required attribute, this is the prefix of the location where perl installs will be made, it will be coerced |
|
116
|
|
|
|
|
|
|
into a L<Path::Class::Dir> object by L<MooseX::Types::Path::Class>. |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
example: |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
prefix = /home/cpan/pit/rel |
|
121
|
|
|
|
|
|
|
perls will be installed as /home/cpan/pit/perl-5.12.0, /home/cpan/pit/perl-5.10.1, etc. |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=item C<perl_exe> |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
A required attribute, this is the path to the perl executable that the plugin will configure, it will be |
|
126
|
|
|
|
|
|
|
coerced to a L<Path::Class::File> object by L<MooseX::Types::Path::Class>. |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=item C<mirrors> |
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
A required attribute, this is an arrayref of L<URI> objects representing CPAN Mirrors to use. It uses |
|
131
|
|
|
|
|
|
|
type C<ArrayRefUri> from L<App::SmokeBrew::Types>, so will coerce L<URI> objects from ordinary strings and |
|
132
|
|
|
|
|
|
|
from an arrayref of strings. It is set to C<auto_deref>. |
|
133
|
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=item C<mx> |
|
135
|
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
Optional attribute, which has no default value, this is the address or IP address of a mail exchanger to use |
|
137
|
|
|
|
|
|
|
for sending test reports. |
|
138
|
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=item C<verbose> |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
Optional boolean attribute, which defaults to 0, indicates whether the plugin should produce verbose output. |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=item C<noclean> |
|
144
|
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
Optional boolean attribute, which defaults to 0, indicates whether the plugin should cleanup files that it |
|
146
|
|
|
|
|
|
|
produces under the C<builddir> or not. |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=back |
|
149
|
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=head1 METHODS |
|
151
|
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
Consumer classes as required to implement the following methods: |
|
153
|
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=over |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=item C<configure> |
|
157
|
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
Called by L<smokebrew> to configure the given perl for CPAN Testing. |
|
159
|
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
=back |
|
161
|
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=head1 PLUGIN OPTIONS |
|
163
|
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
L<App::SmokeBrew> will pass any options it finds in a named section of the configuration file for a |
|
165
|
|
|
|
|
|
|
plugin when it a new plugin instance. See L<smokebrew> for details. You are expected to document any options |
|
166
|
|
|
|
|
|
|
that may be passed to your plugin in this manner. |
|
167
|
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
169
|
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
L<smokebrew> |
|
171
|
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
L<Moose::Role> |
|
173
|
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
L<MooseX::Types::Email> |
|
175
|
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
L<MooseX::Types::Path::Class> |
|
177
|
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=head1 AUTHOR |
|
179
|
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
Chris Williams <chris@bingosnet.co.uk> |
|
181
|
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
183
|
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
This software is copyright (c) 2020 by Chris Williams. |
|
185
|
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
187
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
188
|
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
=cut |