blib/lib/Punk/Upload.pm

filter: Statementstmt 80.7% 21 / 26 Branchbran 25.0% 2 / 8 Conditioncond 16.6% 1 / 6 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 85.7% 6 / 7 Podpod 100% 2 / 2 totaltotal 60.3% 32 / 53 CC 7 SCAR 17.5
CC
7
Cov
60%
fh
8.7
fh
8.7
BEGIN
1.0
CRAP 5.8
« blib/lib/Punk/Plugin/I18n.pm ↑ Summary blib/lib/Punk/Plugin/RequestId.pm »
1 package Punk::Upload;
2  
3 255 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 255 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 255 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 255 ▶use Carp ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7 255 ▶use Punk ();
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 255 our $VERSION = '0.69';
10  
11 1 ▶sub fh {
Subroutine fh: called CC=4 SCAR=21.7
Pod documented
12 0 ▶ my ($self) = @_;
Subroutine fh: not called CC=4 SCAR=21.7
Pod documented
13 0 my $path = $self->path;
14 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
Condition16%1/6
defined $path and length $path
!ll&&!rl&&r
001
defined $path and length $path
!ll&&!rl&&r
000
MC/DC0%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 table33%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
15 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
16 or Carp::croak("Punk::Upload: cannot open '$path': $!");
17 0 return $fh;
18 }
19  
20 255 1;
21  
22 __END__
« blib/lib/Punk/Plugin/I18n.pm ↑ Summary blib/lib/Punk/Plugin/RequestId.pm »