Wrapper/Log.pm

filter: Statementstmt 96.1% 25 / 26 Branchbran 83.3% 5 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 90.0% 9 / 10 Podpod 100% 7 / 7 totaltotal 93.8% 46 / 49 CC 4 SCAR 4.3
CC
4
Cov
94%
new
2.0
modifications
2.0
message
2.0
CRAP 1.5
« Wrapper/File/RawModification.pm ↑ Summary Wrapper/Exception.pm »
1 package Git::Wrapper::Log;
2 # ABSTRACT: Log line of the Git
3 7 $Git::Wrapper::Log::VERSION = '0.048_090'; # TRIAL
4  
5 7 ▶$Git::Wrapper::Log::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 13 ▶sub new {
Subroutine new: called CC=2 SCAR=7.1
Pod documented
10 13 my ($class, $id, %arg) = @_;
11 13 ▶ my $modifications = defined $arg{modifications} ? delete $arg{modifications} : [];
Branch: 1 branch
BranchTrueFalseTotal
defined $arg{'modifications'} ? : 0 13 13
12 13 return bless {
13 id => $id,
14 attr => {},
15 modifications => $modifications,
16 %arg,
17 } => $class;
18 }
19  
20 2 ▶sub id { shift->{id} }
Subroutine id: called CC=1 SCAR=0.0
Pod documented
21 27 ▶sub attr { shift->{attr} }
Subroutine attr: called CC=1 SCAR=0.0
Pod documented
22  
23 6 ▶sub modifications {
Subroutine modifications: called CC=2 SCAR=6.9
Pod documented
24 6 my $self = shift;
25 6 ▶ if (@_ > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ > 0) { } 3 3 6
26 3 $self->{modifications} = [@_];
27 3 return scalar @{$self->{modifications}};
28 }
29 3 else { return @{$self->{modifications}} }
30 }
31  
32 18 ▶sub message { @_ > 1 ? ($_[0]->{message} = $_[1]) : $_[0]->{message} }
Subroutine message: called CC=2 SCAR=6.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
@_ > 1 ? : 13 5 18
33  
34 1 ▶sub date { shift->attr->{date} }
Subroutine date: called CC=1 SCAR=0.0
Pod documented
35  
36 0 ▶sub author { shift->attr->{author} }
Subroutine author: not called CC=1 SCAR=6.9
Pod documented
37  
38 7 1;
39  
40 __END__
« Wrapper/File/RawModification.pm ↑ Summary Wrapper/Exception.pm »