line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
1032
|
use 5.006; # our |
|
2
|
|
|
|
|
6
|
|
2
|
2
|
|
|
2
|
|
8
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
40
|
|
3
|
2
|
|
|
2
|
|
6
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
143
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Git::PurePerl::Walker::OnCommit::List; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.004001'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: Execute an ordered list of OnCommit events. |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
12
|
|
|
|
|
|
|
|
13
|
2
|
|
|
2
|
|
470
|
use Moose qw( with has around ); |
|
2
|
|
|
|
|
288628
|
|
|
2
|
|
|
|
|
14
|
|
14
|
2
|
|
|
2
|
|
8154
|
use MooseX::Types::Moose qw( ArrayRef ); |
|
2
|
|
|
|
|
38286
|
|
|
2
|
|
|
|
|
14
|
|
15
|
2
|
|
|
2
|
|
6666
|
use Git::PurePerl::Walker::Types qw( GPPW_OnCommit ); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
10
|
|
16
|
2
|
|
|
2
|
|
3847
|
use namespace::autoclean; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
18
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
with qw( Git::PurePerl::Walker::Role::OnCommit ); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
has 'events' => ( |
55
|
|
|
|
|
|
|
isa => ArrayRef [GPPW_OnCommit], |
56
|
|
|
|
|
|
|
is => 'rw', |
57
|
|
|
|
|
|
|
handles => { |
58
|
|
|
|
|
|
|
all_events => 'elements', |
59
|
|
|
|
|
|
|
add_event => 'push', |
60
|
|
|
|
|
|
|
}, |
61
|
|
|
|
|
|
|
traits => [qw( Array )], |
62
|
|
|
|
|
|
|
default => sub { [] }, |
63
|
|
|
|
|
|
|
); |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub handle { |
72
|
1
|
|
|
1
|
1
|
31209
|
my ( $self, $commit ) = @_; |
73
|
1
|
|
|
|
|
42
|
for my $child ( $self->all_events ) { |
74
|
2
|
|
|
|
|
13
|
$child->handle($commit); |
75
|
|
|
|
|
|
|
} |
76
|
1
|
|
|
|
|
4
|
return $self; |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
## no critic ( Subroutines::ProhibitBuiltinHomonyms ) |
86
|
|
|
|
|
|
|
sub reset { |
87
|
0
|
|
|
0
|
1
|
|
my ( $self, ) = @_; |
88
|
0
|
|
|
|
|
|
for my $child ( $self->events ) { |
89
|
0
|
|
|
|
|
|
$child->reset(); |
90
|
|
|
|
|
|
|
} |
91
|
0
|
|
|
|
|
|
return $self; |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
## use critic |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
around add_event => sub { |
96
|
|
|
|
|
|
|
my ( $orig, $self, @args ) = @_; |
97
|
|
|
|
|
|
|
if ( not $self->_repo ) { |
98
|
|
|
|
|
|
|
return $orig->( $self, @args ); |
99
|
|
|
|
|
|
|
} |
100
|
|
|
|
|
|
|
my (@new) = map { $_->for_repository( $self->_repo ) } @args; |
101
|
|
|
|
|
|
|
return $orig->( $self, @new ); |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
}; |
104
|
|
|
|
|
|
|
around for_repository => sub { |
105
|
|
|
|
|
|
|
my ( $orig, $self, @args ) = @_; |
106
|
|
|
|
|
|
|
my $new = $self->$orig(@args); |
107
|
|
|
|
|
|
|
$new->events( [ map { $_->for_repository( $args[0] ) } $self->all_events ] ); |
108
|
|
|
|
|
|
|
return $new; |
109
|
|
|
|
|
|
|
}; |
110
|
|
|
|
|
|
|
|
111
|
2
|
|
|
2
|
|
764
|
no Moose; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
12
|
|
112
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
113
|
|
|
|
|
|
|
1; |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
__END__ |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=pod |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=encoding UTF-8 |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=head1 NAME |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Git::PurePerl::Walker::OnCommit::List - Execute an ordered list of OnCommit events. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head1 VERSION |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
version 0.004001 |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=head1 CONSTRUCTOR ARGUMENTS |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=head2 events |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=head2 events |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=head1 ATTRIBUTE GENERATED METHODS |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=head2 all_events |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=head2 add_event |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=head1 INHERITED METHODS |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=head2 for_repository |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
L<< C<Git::PurePerl::B<Walker::Role::HasRepo>-E<gt>I<for_repository( $repo )>>|Git::PurePerl::Walker::Role::HasRepo/for_repository >> |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
=head2 clone |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
L<< C<MooseX::B<Clone>-E<gt>I<clone( %params )>>|MooseX::Clone/clone-params >> |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=head2 _repo |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
L<< C<Git::PurePerl::B<Walker::Role::HasRepo>-E<gt>I<_repo( $repo )>>|Git::PurePerl::Walker::Role::HasRepo/_repo >> |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=head1 CONSUMED ROLES |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=head2 Git::PurePerl::Walker::Role::OnCommit |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
L<< C<Git::PurePerl::B<Walker::Role::OnCommit>>|Git::PurePerl::Walker::Role::OnCommit >> |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
=head1 ROLE SATISFYING METHODS |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
=head2 handle |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
L<< C<Git::PurePerl::B<Walker::Role::OnCommit>-E<gt>I<handle( $commit )>>|Git::PurePerl::Walker::Role::OnCommit/handle >> |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
=head2 reset |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
L<< C<Git::PurePerl::B<Walker::Role::OnCommit>-E<gt>I<reset()>>|Git::PurePerl::Walker::Role::OnCommit/reset >> |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
=head1 AUTHOR |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
Kent Fredric <kentnl@cpan.org> |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
This software is copyright (c) 2017 by Kent Fredric <kentnl@cpan.org>. |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
182
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
=cut |