line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
4
|
|
|
4
|
|
3925388
|
use 5.006; # our |
|
4
|
|
|
|
|
15
|
|
2
|
4
|
|
|
4
|
|
25
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
118
|
|
3
|
4
|
|
|
4
|
|
17
|
use warnings; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
413
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Git::PurePerl::Walker::OnCommit::CallBack; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.004001'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: Execute a sub() for each commit |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
12
|
|
|
|
|
|
|
|
13
|
4
|
|
|
4
|
|
449
|
use Moose qw( with has ); |
|
4
|
|
|
|
|
296675
|
|
|
4
|
|
|
|
|
45
|
|
14
|
4
|
|
|
4
|
|
21325
|
use MooseX::Types::Moose qw( CodeRef ); |
|
4
|
|
|
|
|
40106
|
|
|
4
|
|
|
|
|
89
|
|
15
|
4
|
|
|
4
|
|
15542
|
use namespace::autoclean; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
50
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
with qw( Git::PurePerl::Walker::Role::OnCommit ); |
24
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
has callback => ( |
54
|
|
|
|
|
|
|
handles => { do_callback => 'execute', }, |
55
|
|
|
|
|
|
|
is => 'rw', |
56
|
|
|
|
|
|
|
isa => CodeRef, |
57
|
|
|
|
|
|
|
required => 1, |
58
|
|
|
|
|
|
|
traits => [qw( Code )], |
59
|
|
|
|
|
|
|
); |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub handle { |
68
|
5
|
|
|
5
|
1
|
33043
|
my ( $self, $commit ) = @_; |
69
|
5
|
|
|
|
|
198
|
$self->do_callback($commit); |
70
|
5
|
|
|
|
|
94
|
return $self; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
## no critic ( Subroutines::ProhibitBuiltinHomonyms ) |
80
|
|
|
|
|
|
|
sub reset { |
81
|
1
|
|
|
1
|
1
|
1
|
return shift; |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
## use critic |
84
|
|
|
|
|
|
|
|
85
|
4
|
|
|
4
|
|
771
|
no Moose; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
26
|
|
86
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
87
|
|
|
|
|
|
|
1; |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
__END__ |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=pod |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=encoding UTF-8 |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 NAME |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Git::PurePerl::Walker::OnCommit::CallBack - Execute a sub() for each commit |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 VERSION |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
version 0.004001 |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 CONSTRUCTOR ARGUMENTS |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head2 callback |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head2 callback |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 ATTRIBUTE GENERATED METHODS |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head2 callback |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head2 do_callback |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=head1 INHERITED METHODS |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head2 for_repository |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
L<< C<Git::PurePerl::B<Walker::Role::HasRepo>-E<gt>I<for_repository( $repo )>>|Git::PurePerl::Walker::Role::HasRepo/for_repository >> |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head2 clone |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
L<< C<MooseX::B<Clone>-E<gt>I<clone( %params )>>|MooseX::Clone/clone-params >> |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head2 _repo |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
L<< C<Git::PurePerl::B<Walker::Role::HasRepo>-E<gt>I<_repo( $repo )>>|Git::PurePerl::Walker::Role::HasRepo/_repo >> |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=head1 CONSUMED ROLES |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=head2 Git::PurePerl::Walker::Role::OnCommit |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
L<< C<Git::PurePerl::B<Walker::Role::OnCommit>>|Git::PurePerl::Walker::Role::OnCommit >> |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=head1 ROLE SATISFYING METHODS |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=head2 handle |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
L<< C<Git::PurePerl::B<Walker::Role::OnCommit>-E<gt>I<handle( $commit )>>|Git::PurePerl::Walker::Role::OnCommit/handle >> |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=head2 reset |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
L<< C<Git::PurePerl::B<Walker::Role::OnCommit>-E<gt>I<reset()>>|Git::PurePerl::Walker::Role::OnCommit/reset >> |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=head1 AUTHOR |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
Kent Fredric <kentnl@cpan.org> |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
This software is copyright (c) 2017 by Kent Fredric <kentnl@cpan.org>. |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
156
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=cut |