Die/select.pm

filter: Statementstmt 100% 11 / 11 Branchbran 83.3% 5 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 94.7% 18 / 19 CC 4 SCAR 12.3
CC
4
Cov
94%
select
4.0
BEGIN
1.0
CRAP 3.4
« Die/chmod.pm ↑ Summary Die/mkdir.pm »
1 package IO::Die;
2  
3 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 678 ▶sub select {
Subroutine select: called CC=4 SCAR=13.9
6 678 my ( $NS, $timeout ) = ( shift, $_[3] );
7  
8 #Perl::Critic says not to use one-arg select() anyway.
9 678 ▶ die "Need four args!" if @_ < 4;
Branch: 1 branch
BranchTrueFalseTotal
if @_ < 4 0 678 678
10  
11 678 local ( $!, $^E );
12 678 my ( $nfound, $timeleft ) = CORE::select( $_[0], $_[1], $_[2], $timeout );
13  
14 678 ▶ if ($^E) {
Branch: 1 branch
BranchTrueFalseTotal
if ($^E) 4 674 678
15 4 $NS->__THROW('Select');
16 }
17  
18 674 ▶ return wantarray ? ( $nfound, $timeleft ) : $nfound;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 670 4 674
19 }
20  
21 4 1;
« Die/chmod.pm ↑ Summary Die/mkdir.pm »