Wrapper/Statuses.pm

filter: Statementstmt 100% 24 / 24 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 100% 4 / 4 totaltotal 100% 40 / 40 CC 3 SCAR 3.4
CC
3
Cov
100%
get
2.0
is_dirty
2.0
BEGIN
1.0
CRAP 1.4
« Wrapper/Exception.pm ↑ Summary Wrapper/Status.pm »
1 package Git::Wrapper::Statuses;
2 # ABSTRACT: Multiple git statuses information
3 7 $Git::Wrapper::Statuses::VERSION = '0.048_090'; # TRIAL
4  
5 7 ▶$Git::Wrapper::Statuses::VERSION = '0.048090';use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 7 ▶use Git::Wrapper::Status;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 39 ▶sub new { return bless {} => shift }
Subroutine new: called CC=1 SCAR=0.0
Pod documented
12  
13 31 ▶sub add {
Subroutine add: called CC=1 SCAR=0.0
Pod documented
14 31 my ($self, $type, $mode, $from, $to) = @_;
15  
16 31 my $status = Git::Wrapper::Status->new($mode, $from, $to);
17  
18 31 push @{ $self->{ $type } }, $status;
19 }
20  
21 28 ▶sub get {
Subroutine get: called CC=2 SCAR=6.9
Pod documented
22 28 my ($self, $type) = @_;
23  
24 28 ▶ return @{ defined $self->{$type} ? $self->{$type} : [] };
Branch: 1 branch
BranchTrueFalseTotal
defined $self->{$type} ? : 6 22 28
25 }
26  
27 11 ▶sub is_dirty {
Subroutine is_dirty: called CC=2 SCAR=6.9
Pod documented
28 11 my( $self ) = @_;
29  
30 11 ▶ return keys %$self ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
keys %$self ? : 6 5 11
31 }
32  
33 7 1;
34  
35 __END__
« Wrapper/Exception.pm ↑ Summary Wrapper/Status.pm »