line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Dist::Zilla::Plugin::Code::PrereqSource; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
2096
|
use 5.006; |
|
2
|
|
|
|
|
10
|
|
4
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
41
|
|
5
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
81
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.007'; |
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
612
|
use Moose; |
|
2
|
|
|
|
|
462258
|
|
|
2
|
|
|
|
|
22
|
|
10
|
2
|
|
|
2
|
|
14586
|
use namespace::autoclean; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
32
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::PrereqSource'; |
13
|
|
|
|
|
|
|
|
14
|
2
|
|
|
2
|
|
990
|
use Config::MVP 2.200012 (); # https://github.com/rjbs/Config-MVP/issues/13 |
|
2
|
|
|
|
|
265
|
|
|
2
|
|
|
|
|
57
|
|
15
|
2
|
|
|
2
|
|
516
|
use MooseX::Types::Moose qw(CodeRef); |
|
2
|
|
|
|
|
55732
|
|
|
2
|
|
|
|
|
16
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has register_prereqs => ( |
18
|
|
|
|
|
|
|
is => 'ro', |
19
|
|
|
|
|
|
|
isa => 'CodeRef', |
20
|
|
|
|
|
|
|
reader => '_register_prereqs', |
21
|
|
|
|
|
|
|
required => 1, |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub register_prereqs { |
25
|
2
|
|
|
2
|
0
|
75967
|
my $self = shift; |
26
|
|
|
|
|
|
|
|
27
|
2
|
|
|
|
|
91
|
my $code_ref = $self->_register_prereqs; |
28
|
2
|
|
|
|
|
10
|
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::PrereqSource - something that registers prereqs of the dist |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 VERSION |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Version 0.007 |
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::PrereqSource', |
65
|
|
|
|
|
|
|
{ |
66
|
|
|
|
|
|
|
register_prereqs => 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::PrereqSource', |
88
|
|
|
|
|
|
|
{ |
89
|
|
|
|
|
|
|
register_prereqs => 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::PrereqSource> 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::PrereqSource> |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=cut |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
# vim: ts=4 sts=4 sw=4 et: syntax=perl |