Die/lstat.pm

filter: Statementstmt 75.0% 9 / 12 Branchbran 62.5% 5 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 72.7% 16 / 22 CC 5 SCAR 16.9
CC
5
Cov
70%
lstat
6.3
BEGIN
1.0
CRAP 5.4
« Die/print.pm ↑ Summary Die/chdir.pm »
1 package IO::Die;
2  
3 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 #NOTE: To get lstat(_), do lstat(\*_).
6 21 ▶sub lstat {
Subroutine lstat: called CC=5 SCAR=18.4
7 21 my ( $NS, $path_or_fh ) = @_;
8  
9 21 local ( $!, $^E );
10  
11 21 ▶ my $ret = wantarray ? [ CORE::lstat($path_or_fh) ] : CORE::lstat($path_or_fh);
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 14 7 21
12  
13 14 ▶ if ($^E) {
Branch: 1 branch
BranchTrueFalseTotal
if ($^E) 0 14 14
14 0 ▶ if ( __is_a_fh($path_or_fh) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (__is_a_fh($path_or_fh)) 0 0 0
15 0 $NS->__THROW('Stat');
16 }
17  
18 0 $NS->__THROW( 'Stat', path => $path_or_fh );
19 }
20  
21 14 ▶ return wantarray ? @$ret : $ret;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 7 7 14
22 }
23  
24 7 1;
« Die/print.pm ↑ Summary Die/chdir.pm »