| 1 | package Git::Wrapper::Statuses; | ||||||||||
| 2 | # ABSTRACT: Multiple git statuses information | ||||||||||
| 3 | 5 | $Git::Wrapper::Statuses::VERSION = '0.047_090'; # TRIAL | |||||||||
| 4 | |||||||||||
| 5 | 5 | ▶ | $Git::Wrapper::Statuses::VERSION = '0.047090';use 5.006; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 5 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 5 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 5 | ▶ | use Git::Wrapper::Status; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 2 | ▶ | sub new { return bless {} => shift } | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 12 | |||||||||||
| 13 | sub add { | ||||||||||
| 14 | 1 | ▶ | my ($self, $type, $mode, $from, $to) = @_; | ||||||||
|
Subroutine
add: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 15 | |||||||||||
| 16 | 1 | my $status = Git::Wrapper::Status->new($mode, $from, $to); | |||||||||
| 17 | |||||||||||
| 18 | 1 | push @{ $self->{ $type } }, $status; | |||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | sub get { | ||||||||||
| 22 | 0 | ▶ | my ($self, $type) = @_; | ||||||||
|
Subroutine
get: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 23 | |||||||||||
| 24 | 0 | ▶ | return @{ defined $self->{$type} ? $self->{$type} : [] }; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | sub is_dirty { | ||||||||||
| 28 | 2 | ▶ | my( $self ) = @_; | ||||||||
|
Subroutine
is_dirty: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 29 | |||||||||||
| 30 | 2 | ▶ | return keys %$self ? 1 : 0; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 5 | 1; | |||||||||
| 34 | |||||||||||
| 35 | __END__ | ||||||||||