line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Dist::Zilla::Plugin::Code::LicenseProvider; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
2284
|
use 5.006; |
|
2
|
|
|
|
|
10
|
|
4
|
2
|
|
|
2
|
|
14
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
53
|
|
5
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
98
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.006'; |
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
810
|
use Moose; |
|
2
|
|
|
|
|
466859
|
|
|
2
|
|
|
|
|
16
|
|
10
|
2
|
|
|
2
|
|
15049
|
use namespace::autoclean; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
22
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::LicenseProvider'; |
13
|
|
|
|
|
|
|
|
14
|
2
|
|
|
2
|
|
880
|
use Config::MVP 2.200012 (); # https://github.com/rjbs/Config-MVP/issues/13 |
|
2
|
|
|
|
|
198
|
|
|
2
|
|
|
|
|
59
|
|
15
|
2
|
|
|
2
|
|
441
|
use MooseX::Types::Moose qw(CodeRef); |
|
2
|
|
|
|
|
55134
|
|
|
2
|
|
|
|
|
20
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has provide_license => ( |
18
|
|
|
|
|
|
|
is => 'ro', |
19
|
|
|
|
|
|
|
isa => 'CodeRef', |
20
|
|
|
|
|
|
|
reader => '_provide_license', |
21
|
|
|
|
|
|
|
required => 1, |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub provide_license { |
25
|
2
|
|
|
2
|
0
|
104099
|
my $self = shift; |
26
|
|
|
|
|
|
|
|
27
|
2
|
|
|
|
|
99
|
my $code_ref = $self->_provide_license; |
28
|
2
|
|
|
|
|
18
|
return $self->$code_ref(@_); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=pod |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=encoding UTF-8 |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 NAME |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Dist::Zilla::Plugin::Code::LicenseProvider - something that offers a license for a dist |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 VERSION |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Version 0.006 |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 SYNOPSIS |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 Dist::Zilla::Role::PluginBundle |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
package Dist::Zilla::PluginBundle::MyBundle; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
use Moose; |
56
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::PluginBundle'; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub bundle_config { |
59
|
|
|
|
|
|
|
my ( $class, $section ) = @_; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
my @plugins; |
62
|
|
|
|
|
|
|
push @plugins, [ |
63
|
|
|
|
|
|
|
'SomeUniqueName', |
64
|
|
|
|
|
|
|
'Dist::Zilla::Plugin::Code::LicenseProvider', |
65
|
|
|
|
|
|
|
{ |
66
|
|
|
|
|
|
|
provide_license => sub { |
67
|
|
|
|
|
|
|
my ($self) = @_; |
68
|
|
|
|
|
|
|
$self->log('Hello world'); |
69
|
|
|
|
|
|
|
}, |
70
|
|
|
|
|
|
|
}, |
71
|
|
|
|
|
|
|
]; |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
return @plugins; |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head2 Dist::Zilla::Role::PluginBundle::Easy |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
package Dist::Zilla::PluginBundle::MyBundle; |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
use Moose; |
81
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::PluginBundle::Easy'; |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
sub configure { |
84
|
|
|
|
|
|
|
my ( $self ) = @_; |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
$self->add_plugins([ |
87
|
|
|
|
|
|
|
'Code::LicenseProvider', |
88
|
|
|
|
|
|
|
{ |
89
|
|
|
|
|
|
|
provide_license => sub { |
90
|
|
|
|
|
|
|
my ($self) = @_; |
91
|
|
|
|
|
|
|
$self->log('Hello world'); |
92
|
|
|
|
|
|
|
}, |
93
|
|
|
|
|
|
|
}, |
94
|
|
|
|
|
|
|
]); |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
return; |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 DESCRIPTION |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
This plugin implements the L<Dist::Zilla::Role::LicenseProvider> role. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 SUPPORT |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head2 Bugs / Feature Requests |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Please report any bugs or feature requests through the issue tracker |
108
|
|
|
|
|
|
|
at L<https://github.com/skirmess/Dist-Zilla-Plugin-Code/issues>. |
109
|
|
|
|
|
|
|
You will be notified automatically of any progress on your issue. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head2 Source Code |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
This is open source software. The code repository is available for |
114
|
|
|
|
|
|
|
public review and contribution under the terms of the license. |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
L<https://github.com/skirmess/Dist-Zilla-Plugin-Code> |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
git clone https://github.com/skirmess/Dist-Zilla-Plugin-Code.git |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=head1 AUTHOR |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
Sven Kirmess <sven.kirmess@kzone.ch> |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
This software is Copyright (c) 2020-2021 by Sven Kirmess. |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
This is free software, licensed under: |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
The (two-clause) FreeBSD License |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=head1 SEE ALSO |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
L<Dist::Zilla>, L<Dist::Zilla::Role::LicenseProvider> |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=cut |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
# vim: ts=4 sts=4 sw=4 et: syntax=perl |