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
|
|
1839
|
use 5.006; |
|
2
|
|
|
|
|
12
|
|
18
|
2
|
|
|
2
|
|
13
|
use strict; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
47
|
|
19
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
139
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
package Dist::Zilla::Plugin::Code::ReleaseStatusProvider; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
our $VERSION = '0.008'; |
24
|
|
|
|
|
|
|
|
25
|
2
|
|
|
2
|
|
582
|
use Moose; |
|
2
|
|
|
|
|
445356
|
|
|
2
|
|
|
|
|
15
|
|
26
|
2
|
|
|
2
|
|
14119
|
use namespace::autoclean; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
22
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::ReleaseStatusProvider'; |
29
|
|
|
|
|
|
|
|
30
|
2
|
|
|
2
|
|
879
|
use Config::MVP 2.200012 (); # https://github.com/rjbs/Config-MVP/issues/13 |
|
2
|
|
|
|
|
244
|
|
|
2
|
|
|
|
|
55
|
|
31
|
2
|
|
|
2
|
|
442
|
use MooseX::Types::Moose qw(CodeRef); |
|
2
|
|
|
|
|
56178
|
|
|
2
|
|
|
|
|
18
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
has provide_release_status => ( |
34
|
|
|
|
|
|
|
is => 'ro', |
35
|
|
|
|
|
|
|
isa => 'CodeRef', |
36
|
|
|
|
|
|
|
reader => '_provide_release_status', |
37
|
|
|
|
|
|
|
required => 1, |
38
|
|
|
|
|
|
|
); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub provide_release_status { |
41
|
2
|
|
|
2
|
0
|
108244
|
my $self = shift; |
42
|
|
|
|
|
|
|
|
43
|
2
|
|
|
|
|
108
|
my $code_ref = $self->_provide_release_status; |
44
|
2
|
|
|
|
|
14
|
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::ReleaseStatusProvider - something that provides a release status for the dist |
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::ReleaseStatusProvider', |
81
|
|
|
|
|
|
|
{ |
82
|
|
|
|
|
|
|
provide_release_status => sub { |
83
|
|
|
|
|
|
|
my ($self) = @_; |
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::ReleaseStatusProvider', |
104
|
|
|
|
|
|
|
{ |
105
|
|
|
|
|
|
|
provide_release_status => sub { |
106
|
|
|
|
|
|
|
my ($self) = @_; |
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::ReleaseStatusProvider> 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::ReleaseStatusProvider> |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=cut |