Wrapper/File/RawModification.pm

filter: Statementstmt 83.3% 20 / 24 Branchbran 100% 2 / 2 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 63.6% 7 / 11 Podpod 100% 8 / 8 totaltotal 80.0% 40 / 50 SCAR 11.1
CC
3
Cov
83%
new
3.0
perms_from
2.0
perms_to
2.0
CRAP 3.0
« Wrapper/Statuses.pm ↑ Summary Wrapper/Status.pm »
1 package Git::Wrapper::File::RawModification;
2 # ABSTRACT: Modification of a file in a commit
3 5 $Git::Wrapper::File::RawModification::VERSION = '0.047_090'; # TRIAL
4  
5 5 ▶$Git::Wrapper::File::RawModification::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 sub new {
10 4 ▶ my ($class, $filename, $type, $perms_from, $perms_to, $blob_from, $blob_to) = @_;
Subroutine new: called CC=3 SCAR=11.0
Pod documented
11  
12 4 my $score;
13 4 ▶ if ( defined $type && $type =~ s{^(.)([0-9]+)$}{$1} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $type and $type =~ s/^(.)([0-9]+)$/$1/) 2 2 4
Condition66%2/3
defined $type and $type =~ s/^(.)([0-9]+)$/$1/
!ll&&!rl&&r
022
MC/DC50%1/2
defined $type and $type =~ s/^(.)([0-9]+)$/$1/
defined $type $type =~ s/^(.)([0-9]+)$/$1/
Truth table66%2/3
A and B
A= defined $typeB= $type =~ s/^(.)([0-9]+)$/$1/
ABresult
0X0
100
111
14 2 $score = $2;
15 2 (undef, $filename) = split(qr{\s+}, $filename, 2 );
16 }
17  
18 4 return bless {
19 filename => $filename,
20 type => $type,
21 score => $score,
22 perms_from => $perms_from,
23 perms_to => $perms_to,
24 blob_from => $blob_from,
25 blob_to => $blob_to,
26 } => $class;
27 }
28  
29 2 ▶sub filename { shift->{filename} }
Subroutine filename: called CC=1 SCAR=0.0
Pod documented
30 2 ▶sub type { shift->{type} }
Subroutine type: called CC=1 SCAR=0.0
Pod documented
31 2 ▶sub score { shift->{score} }
Subroutine score: called CC=1 SCAR=0.0
Pod documented
32  
33 0 ▶sub perms_from { shift->{perms_from} }
Subroutine perms_from: not called CC=1 SCAR=6.9
Pod documented
34 0 ▶sub perms_to { shift->{perms_to} }
Subroutine perms_to: not called CC=1 SCAR=6.9
Pod documented
35  
36 0 ▶sub blob_from { shift->{blob_from} }
Subroutine blob_from: not called CC=1 SCAR=6.9
Pod documented
37 0 ▶sub blob_to { shift->{blob_to} }
Subroutine blob_to: not called CC=1 SCAR=6.9
Pod documented
38  
39 5 1;
40  
41 __END__
« Wrapper/Statuses.pm ↑ Summary Wrapper/Status.pm »