blib/lib/Punk/Upload.pm

filter: Statementstmt 80.7% 21 / 26 Branchbran 25.0% 2 / 8 (2 uncoverable) Conditioncond 50.0% 1 / 6 (2 uncoverable) MC/DCmcdc 50.0% 0 / 4 (2 uncoverable) Subroutinesub 85.7% 6 / 7 Podpod 100% 2 / 2 totaltotal 67.9% 32 / 53 (6 uncoverable) CC 7 SCAR 15.7
CC
7
Cov
65%
fh
7.2
fh
7.2
BEGIN
1.0
CRAP 4.8
« blib/lib/Punk/Plugin/RequestId.pm ↑ Summary blib/lib/Punk/Test/WS/Conn.pm »
1 package Punk::Upload;
2  
3 350 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 350 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 350 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 350 ▶use Carp ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7 350 ▶use Punk ();
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 350 our $VERSION = '0.70';
10  
11 1 ▶sub fh {
Subroutine fh: called CC=4 SCAR=19.7
Pod documented
12 0 ▶ my ($self) = @_;
Subroutine fh: not called CC=4 SCAR=19.7
Pod documented
13 0 my $path = $self->path;
14 # uncoverable branch true
15 # uncoverable condition left
16 # uncoverable condition right
17 0 ▶ return undef unless defined $path && length $path;
Branch: 2 branches
BranchTrueFalseTotal
unless defined $path and length $path 0 1 1
unless defined $path and length $path 0 0 0
Condition50%1/6
defined $path and length $path
!ll&&!rl&&r
001
defined $path and length $path
!ll&&!rl&&r
000
MC/DC100%0/2
defined $path and length $path
defined $path length $path
MC/DC0%0/2
defined $path and length $path
defined $path length $path
Truth table100%1/3
A and B
A= defined $pathB= length $path
ABresult
0X0
100
111
Truth table0%0/3
A and B
A= defined $pathB= length $path
ABresult
0X0
100
111
18 # uncoverable branch true
19 0 ▶ open my $fh, '<:raw', $path
Branch: 2 branches
BranchTrueFalseTotal
open my $fh, "<:raw", $path or Carp::croak("Punk::Upload: cannot open '${path}': $!") 1 0 1
open my $fh, "<:raw", $path or Carp::croak("Punk::Upload: cannot open '${path}': $!") 0 0 0
20 or Carp::croak("Punk::Upload: cannot open '$path': $!");
21 0 return $fh;
22 }
23  
24 350 1;
25  
26 __END__
« blib/lib/Punk/Plugin/RequestId.pm ↑ Summary blib/lib/Punk/Test/WS/Conn.pm »