Plient/Protocol/File.pm

filter: Statementstmt 56.2% 9 / 16 Branchbran 25.0% 1 / 4 Conditioncond 0.0% 0 / 5 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 40.0% 2 / 5 Podpod 0.0% 0 / 3 totaltotal 34.2% 12 / 35 CC 3 SCAR 17.9
CC
3
Cov
40%
get
12.0
prefix
2.0
methods
2.0
CRAP 6.0
« Plient/Util.pm ↑ Summary Plient/Handler.pm »
1 package Plient::Protocol::File;
2  
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶require Plient::Protocol unless $Plient::bundle_mode;
Branch: 1 branch
BranchTrueFalseTotal
unless $Plient::bundle_mode 2 0 2
6 2 our @ISA = 'Plient::Protocol';
7  
8 0 ▶sub prefix { 'file' }
Subroutine prefix: not called CC=1 SCAR=6.9
Pod undocumented
9 0 ▶sub methods { qw/get/ }
Subroutine methods: not called CC=1 SCAR=6.9
Pod undocumented
10  
11 0 ▶sub get {
Subroutine get: not called CC=3 SCAR=24.8
Pod undocumented
12 0 my ( $file, $args ) = @_;
13 0 $file =~ s!file:(?://)?!!; # file:foo/bar is valid too
14 0 ▶ open my $fh, '<', $file or warn "failed to open $file: $!" and return;
Branch: 1 branch
BranchTrueFalseTotal
open my $fh, "<", $file or warn "failed to open ${file}: $!" and return 0 0 0
Condition0%0/5
open(my $fh, '<', $file) || warn("failed to open ${file}: $!") && (return)
l!l&&r!l&&!r
000
warn "failed to open ${file}: $!" and return
!ll
00
MC/DC0%0/2
open(my $fh, '<', $file) || warn("failed to open ${file}: $!") && (return)
open(my $fh, '<', $file) warn "failed to open ${file}: $!"
Truth table0%0/3
A || B
A= open(my $fh, '<', $file)B= warn "failed to open ${file}: $!"
ABresult
1X1
011
000
15 0 local $/;
16 0 <$fh>;
17 }
18  
19 2 1;
20  
21 __END__
« Plient/Util.pm ↑ Summary Plient/Handler.pm »