« blib/lib/Git/PurePerl/Walker/Method/FirstParent.pm
↑ Summary
blib/lib/Git/PurePerl/Walker/Role/HasRepo.pm »
| 1 | 2 | ▶ | use 5.008; # utf8 | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | package Git::PurePerl::Walker::Method::FirstParent::FromHEAD; | ||||||||||
| 7 | |||||||||||
| 8 | 2 | our $VERSION = '0.004000'; | |||||||||
| 9 | |||||||||||
| 10 | # ABSTRACT: Start at the HEAD of the current repo. | ||||||||||
| 11 | |||||||||||
| 12 | 2 | our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY | |||||||||
| 13 | |||||||||||
| 14 | 2 | ▶ | use Moose qw( extends has ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | |||||||||||
| 16 | |||||||||||
| 17 | |||||||||||
| 18 | |||||||||||
| 19 | |||||||||||
| 20 | |||||||||||
| 21 | |||||||||||
| 22 | 2 | extends 'Git::PurePerl::Walker::Method::FirstParent'; | |||||||||
| 23 | |||||||||||
| 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 | |||||||||||
| 54 | |||||||||||
| 55 | |||||||||||
| 56 | |||||||||||
| 57 | |||||||||||
| 58 | |||||||||||
| 59 | |||||||||||
| 60 | |||||||||||
| 61 | 2 | has '+start' => ( | |||||||||
| 62 | init_arg => undef, | ||||||||||
| 63 | lazy_build => 1, | ||||||||||
| 64 | required => 0, | ||||||||||
| 65 | ); | ||||||||||
| 66 | |||||||||||
| 67 | |||||||||||
| 68 | |||||||||||
| 69 | |||||||||||
| 70 | |||||||||||
| 71 | 2 | has '+_repo' => ( predicate => '_has_repo', ); | |||||||||
| 72 | |||||||||||
| 73 | |||||||||||
| 74 | |||||||||||
| 75 | |||||||||||
| 76 | |||||||||||
| 77 | sub _build_start { | ||||||||||
| 78 | 1 | ▶ | my $self = shift; | ||||||||
|
Subroutine
_build_start: called CC=2 SCAR=8.4
| |||||||||||
| 79 | 1 | ▶ | if ( not $self->_has_repo ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 80 | 0 | require Carp; | |||||||||
| 81 | 0 | Carp::confess('No repo defined while trying to find a starting commit'); | |||||||||
| 82 | } | ||||||||||
| 83 | 1 | return $self->_repo->head_sha1; | |||||||||
| 84 | } | ||||||||||
| 85 | |||||||||||
| 86 | |||||||||||
| 87 | |||||||||||
| 88 | |||||||||||
| 89 | |||||||||||
| 90 | |||||||||||
| 91 | |||||||||||
| 92 | |||||||||||
| 93 | |||||||||||
| 94 | |||||||||||
| 95 | |||||||||||
| 96 | |||||||||||
| 97 | |||||||||||
| 98 | |||||||||||
| 99 | |||||||||||
| 100 | |||||||||||
| 101 | |||||||||||
| 102 | |||||||||||
| 103 | |||||||||||
| 104 | |||||||||||
| 105 | |||||||||||
| 106 | |||||||||||
| 107 | |||||||||||
| 108 | |||||||||||
| 109 | |||||||||||
| 110 | |||||||||||
| 111 | |||||||||||
| 112 | |||||||||||
| 113 | |||||||||||
| 114 | |||||||||||
| 115 | |||||||||||
| 116 | |||||||||||
| 117 | |||||||||||
| 118 | |||||||||||
| 119 | |||||||||||
| 120 | |||||||||||
| 121 | |||||||||||
| 122 | |||||||||||
| 123 | |||||||||||
| 124 | |||||||||||
| 125 | |||||||||||
| 126 | |||||||||||
| 127 | |||||||||||
| 128 | |||||||||||
| 129 | |||||||||||
| 130 | |||||||||||
| 131 | |||||||||||
| 132 | |||||||||||
| 133 | |||||||||||
| 134 | |||||||||||
| 135 | |||||||||||
| 136 | |||||||||||
| 137 | |||||||||||
| 138 | |||||||||||
| 139 | |||||||||||
| 140 | 2 | ▶ | no Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 141 | 2 | __PACKAGE__->meta->make_immutable; | |||||||||
| 142 | 2 | 1; | |||||||||
| 143 | |||||||||||
| 144 | __END__ | ||||||||||
| 145 | |||||||||||
| 146 | =pod | ||||||||||
| 147 | |||||||||||
| 148 | =encoding UTF-8 | ||||||||||
| 149 | |||||||||||
| 150 | =head1 NAME | ||||||||||
| 151 | |||||||||||
| 152 | Git::PurePerl::Walker::Method::FirstParent::FromHEAD - Start at the HEAD of the current repo. | ||||||||||
| 153 | |||||||||||
| 154 | =head1 VERSION | ||||||||||
| 155 | |||||||||||
| 156 | version 0.004000 | ||||||||||
| 157 | |||||||||||
| 158 | =head1 INHERITED METHODS | ||||||||||
| 159 | |||||||||||
| 160 | =head2 for_repository | ||||||||||
| 161 | |||||||||||
| 162 | L<< | ||||||||||
| 163 | C<Git::PurePerl::B<Walker::Role::HasRepo>-E<gt>I<for_repository( $repo )>> | ||||||||||
| 164 | |Git::PurePerl::Walker::Role::HasRepo/for_repository | ||||||||||
| 165 | >> | ||||||||||
| 166 | |||||||||||
| 167 | =head2 clone | ||||||||||
| 168 | |||||||||||
| 169 | L<< | ||||||||||
| 170 | C<MooseX::B<Clone>-E<gt>I<clone( %params )>> | ||||||||||
| 171 | |MooseX::Clone/clone-params | ||||||||||
| 172 | >> | ||||||||||
| 173 | |||||||||||
| 174 | =head2 _repo | ||||||||||
| 175 | |||||||||||
| 176 | L<< C<Git::PurePerl::B<Walker::Role::HasRepo>-E<gt>I<_repo( $repo )>>|Git::PurePerl::Walker::Role::HasRepo/_repo >> | ||||||||||
| 177 | |||||||||||
| 178 | =head2 start | ||||||||||
| 179 | |||||||||||
| 180 | L<< C<Git::PurePerl::B<Walker::Method::FirstParent>-E<gt>I<start( $commit )>>|Git::PurePerl::Walker::Method::FirstParent/start >> | ||||||||||
| 181 | |||||||||||
| 182 | =head2 _commit | ||||||||||
| 183 | |||||||||||
| 184 | L<< | ||||||||||
| 185 | C<Git::PurePerl::B<Walker::Method::FirstParent>-E<gt>I<_commit( $commit_object )>> | ||||||||||
| 186 | |Git::PurePerl::Walker::Method::FirstParent/_commit | ||||||||||
| 187 | >> | ||||||||||
| 188 | |||||||||||
| 189 | =head2 _build_commit | ||||||||||
| 190 | |||||||||||
| 191 | L<< | ||||||||||
| 192 | C<Git::PurePerl::B<Walker::Method::FirstParent>-E<gt>I<_build_commit()>> | ||||||||||
| 193 | |Git::PurePerl::Walker::Method::FirstParent/_build_commit | ||||||||||
| 194 | >> | ||||||||||
| 195 | |||||||||||
| 196 | =head2 current | ||||||||||
| 197 | |||||||||||
| 198 | L<< | ||||||||||
| 199 | C<Git::PurePerl::B<Walker::Method::FirstParent>-E<gt>I<current()>> | ||||||||||
| 200 | |Git::PurePerl::Walker::Method::FirstParent/current | ||||||||||
| 201 | >> | ||||||||||
| 202 | |||||||||||
| 203 | =head2 has_next | ||||||||||
| 204 | |||||||||||
| 205 | L<< | ||||||||||
| 206 | C<Git::PurePerl::B<Walker::Method::FirstParent>-E<gt>I<has_next()>> | ||||||||||
| 207 | |Git::PurePerl::Walker::Method::FirstParent/has_next | ||||||||||
| 208 | >> | ||||||||||
| 209 | |||||||||||
| 210 | =head2 next | ||||||||||
| 211 | |||||||||||
| 212 | L<< | ||||||||||
| 213 | C<Git::PurePerl::B<Walker::Method::FirstParent>-E<gt>I<next()>> | ||||||||||
| 214 | |Git::PurePerl::Walker::Method::FirstParent/next | ||||||||||
| 215 | >> | ||||||||||
| 216 | |||||||||||
| 217 | =head2 peek_next | ||||||||||
| 218 | |||||||||||
| 219 | L<< | ||||||||||
| 220 | C<Git::PurePerl::B<Walker::Method::FirstParent>-E<gt>I<peek_next()>> | ||||||||||
| 221 | |Git::PurePerl::Walker::Method::FirstParent/peek_next | ||||||||||
| 222 | >> | ||||||||||
| 223 | |||||||||||
| 224 | =head2 reset | ||||||||||
| 225 | |||||||||||
| 226 | L<< | ||||||||||
| 227 | C<Git::PurePerl::B<Walker::Method::FirstParent>-E<gt>I<reset()>> | ||||||||||
| 228 | |Git::PurePerl::Walker::Method::FirstParent/reset | ||||||||||
| 229 | >> | ||||||||||
| 230 | |||||||||||
| 231 | =head1 PRIVATE METHODS | ||||||||||
| 232 | |||||||||||
| 233 | =head2 _build_start | ||||||||||
| 234 | |||||||||||
| 235 | =head1 PRIVATE ATTRIBUTE GENERATED METHODS | ||||||||||
| 236 | |||||||||||
| 237 | =head2 _has_repo | ||||||||||
| 238 | |||||||||||
| 239 | =head1 EXTENDS | ||||||||||
| 240 | |||||||||||
| 241 | =head2 Git::PurePerl::Walker::Method::FirstParent | ||||||||||
| 242 | |||||||||||
| 243 | L<< C<Git::PurePerl::B<Walker::Method::FirstParent>>|Git::PurePerl::Walker::Method::FirstParent >> | ||||||||||
| 244 | |||||||||||
| 245 | =head1 AUTHOR | ||||||||||
| 246 | |||||||||||
| 247 | Kent Fredric <kentnl@cpan.org> | ||||||||||
| 248 | |||||||||||
| 249 | =head1 COPYRIGHT AND LICENSE | ||||||||||
| 250 | |||||||||||
| 251 | This software is copyright (c) 2014 by Kent Fredric <kentnl@cpan.org>. | ||||||||||
| 252 | |||||||||||
| 253 | This is free software; you can redistribute it and/or modify it under | ||||||||||
| 254 | the same terms as the Perl 5 programming language system itself. | ||||||||||
| 255 | |||||||||||
| 256 | =cut | ||||||||||