Die/shutdown.pm

filter: Statementstmt 100% 11 / 11 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 94.1% 16 / 17 CC 3 SCAR 9.2
CC
3
Cov
93%
shutdown
3.0
BEGIN
1.0
CRAP 2.5
« Die/close.pm ↑ Summary Die/read.pm »
1 package IO::Die;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 ▶sub shutdown {
Subroutine shutdown: called CC=3 SCAR=11.0
6 2 my ( $NS, $socket, $how ) = @_;
7  
8 2 local ( $!, $^E );
9  
10 2 my $res = CORE::shutdown( $socket, $how );
11 2 ▶ if ( !$res ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($res) 1 1 2
12 1 ▶ die "Invalid filehandle!" if !defined $res;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $res 0 1 1
13 1 $NS->__THROW( 'SocketShutdown', how => $how );
14 }
15  
16 1 return $res;
17 }
18  
19 1 1;
« Die/close.pm ↑ Summary Die/read.pm »