| 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
| |||||||||||||||||||||||||||||||||
| 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
Condition0%0/5
open(my $fh, '<', $file) || warn("failed to open ${file}: $!") && (return)
warn "failed to open ${file}: $!" and return
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}: $!"
| |||||||||||||||||||||||||||||||||
| 15 | 0 | local $/; | |||||||||||||||||||||||||||||||
| 16 | 0 | <$fh>; | |||||||||||||||||||||||||||||||
| 17 | } | ||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||
| 19 | 2 | 1; | |||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||
| 21 | __END__ | ||||||||||||||||||||||||||||||||