« blib/lib/Git/PurePerl/Walker/Role/HasRepo.pm
↑ Summary
blib/lib/Git/PurePerl/Walker/Role/OnCommit.pm »
| 1 | 6 | ▶ | use 5.008; #utf8 |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | 6 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 6 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 6 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | package Git::PurePerl::Walker::Role::Method; | ||
| 7 | |||
| 8 | 6 | our $VERSION = '0.004000'; | |
| 9 | |||
| 10 | # ABSTRACT: A method for traversing a git repository | ||
| 11 | |||
| 12 | 6 | our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY | |
| 13 | |||
| 14 | 6 | ▶ | use Moose::Role qw( with requires ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | |||
| 17 | |||
| 18 | |||
| 19 | |||
| 20 | |||
| 21 | |||
| 22 | 6 | with 'Git::PurePerl::Walker::Role::HasRepo'; | |
| 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 | 6 | requires 'current'; | |
| 51 | |||
| 52 | |||
| 53 | |||
| 54 | |||
| 55 | |||
| 56 | |||
| 57 | |||
| 58 | |||
| 59 | |||
| 60 | |||
| 61 | |||
| 62 | 6 | requires 'has_next'; | |
| 63 | |||
| 64 | |||
| 65 | |||
| 66 | |||
| 67 | |||
| 68 | |||
| 69 | |||
| 70 | |||
| 71 | |||
| 72 | 6 | requires 'next'; | |
| 73 | |||
| 74 | |||
| 75 | |||
| 76 | |||
| 77 | |||
| 78 | |||
| 79 | |||
| 80 | |||
| 81 | |||
| 82 | 6 | requires 'peek_next'; | |
| 83 | |||
| 84 | |||
| 85 | |||
| 86 | |||
| 87 | |||
| 88 | |||
| 89 | |||
| 90 | |||
| 91 | |||
| 92 | |||
| 93 | 6 | requires 'reset'; | |
| 94 | |||
| 95 | 6 | ▶ | no Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 96 | 6 | 1; | |
| 97 | |||
| 98 | __END__ | ||
| 99 | |||
| 100 | =pod | ||
| 101 | |||
| 102 | =encoding UTF-8 | ||
| 103 | |||
| 104 | =head1 NAME | ||
| 105 | |||
| 106 | Git::PurePerl::Walker::Role::Method - A method for traversing a git repository | ||
| 107 | |||
| 108 | =head1 VERSION | ||
| 109 | |||
| 110 | version 0.004000 | ||
| 111 | |||
| 112 | =head1 REQUIRES METHODS | ||
| 113 | |||
| 114 | =head2 current | ||
| 115 | |||
| 116 | my $commit = $object->current; | ||
| 117 | |||
| 118 | Should return a L<< C<Git::PurePerl::B<Object::Commit>>|Git::PurePerl::Object::Commmit >> | ||
| 119 | |||
| 120 | =head2 has_next | ||
| 121 | |||
| 122 | if ( $object->has_next ) { | ||
| 123 | |||
| 124 | } | ||
| 125 | |||
| 126 | Should return true if C<< -E<gt>next >> will expose a previously unseen object. | ||
| 127 | |||
| 128 | =head2 next | ||
| 129 | |||
| 130 | my $next_object = $object->next; | ||
| 131 | |||
| 132 | Should internally move to the next object, and return that next object. | ||
| 133 | |||
| 134 | =head2 peek_next | ||
| 135 | |||
| 136 | my $next_object = $object->peek_next; | ||
| 137 | |||
| 138 | The same as L</next> except internal position should not change. | ||
| 139 | |||
| 140 | =head2 reset | ||
| 141 | |||
| 142 | $object->reset; | ||
| 143 | |||
| 144 | Should reset the internal position to some position so that calling | ||
| 145 | C<< $object->current >> returns the first result again. | ||
| 146 | |||
| 147 | =head1 INHERITED METHODS | ||
| 148 | |||
| 149 | =head2 for_repository | ||
| 150 | |||
| 151 | L<< C<Git::PurePerl::B<Walker::Role::HasRepo>-E<gt>I<for_repository( $repo )>>|Git::PurePerl::Walker::Role::HasRepo/for_repository >> | ||
| 152 | |||
| 153 | =head2 clone | ||
| 154 | |||
| 155 | L<< C<MooseX::B<Clone>-E<gt>I<clone( %params )>>|MooseX::Clone/clone-params >> | ||
| 156 | |||
| 157 | =head2 _repo | ||
| 158 | |||
| 159 | L<< C<Git::PurePerl::B<Walker::Role::HasRepo>-E<gt>I<_repo( $repo )>>|Git::PurePerl::Walker::Role::HasRepo/_repo >> | ||
| 160 | |||
| 161 | =head1 CONSUMED ROLES | ||
| 162 | |||
| 163 | =head2 Git::PurePerl::Walker::Role::HasRepo | ||
| 164 | |||
| 165 | L<< C<Git::PurePerl::B<Walker::Role::HasRepo>>|Git::PurePerl::Walker::Role::HasRepo >> | ||
| 166 | |||
| 167 | =head1 AUTHOR | ||
| 168 | |||
| 169 | Kent Fredric <kentnl@cpan.org> | ||
| 170 | |||
| 171 | =head1 COPYRIGHT AND LICENSE | ||
| 172 | |||
| 173 | This software is copyright (c) 2014 by Kent Fredric <kentnl@cpan.org>. | ||
| 174 | |||
| 175 | This is free software; you can redistribute it and/or modify it under | ||
| 176 | the same terms as the Perl 5 programming language system itself. | ||
| 177 | |||
| 178 | =cut | ||