| 1 | package Git::Repository::Plugin::Log; | ||||||||||
| 2 | 3 | $Git::Repository::Plugin::Log::VERSION = '1.314'; | |||||||||
| 3 | 3 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 3 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 3 | ▶ | use 5.006; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 3 | ▶ | use Git::Repository::Plugin; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 3 | our @ISA = qw( Git::Repository::Plugin ); | |||||||||
| 9 | 2 | ▶ | sub _keywords { qw( log ) } | ||||||||
|
Subroutine
_keywords: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 3 | ▶ | use Git::Repository::Log::Iterator; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | 22 | ▶ | sub log { | ||||||||
|
Subroutine
log: called CC=4 SCAR=13.9
Pod
documented
| |||||||||||
| 14 | |||||||||||
| 15 | # skip the invocant when invoked as a class method | ||||||||||
| 16 | 22 | ▶ | shift if !ref $_[0]; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | |||||||||||
| 18 | # get the iterator | ||||||||||
| 19 | 22 | my $iter = Git::Repository::Log::Iterator->new(@_); | |||||||||
| 20 | |||||||||||
| 21 | # scalar context: return the iterator | ||||||||||
| 22 | 18 | ▶ | return $iter if !wantarray; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | |||||||||||
| 24 | # list context: return all Git::Repository::Log objects | ||||||||||
| 25 | 9 | my @logs; | |||||||||
| 26 | 9 | ▶ | while ( my $log = $iter->next ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 27 | 13 | push @logs, $log; | |||||||||
| 28 | } | ||||||||||
| 29 | 7 | return @logs; | |||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | 3 | 1; | |||||||||
| 33 | |||||||||||
| 34 | __END__ | ||||||||||