Die/socket.pm

filter: Statementstmt 100% 9 / 9 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 13 / 13 CC 2 SCAR 5.1
CC
2
Cov
100%
socket
2.0
BEGIN
1.0
CRAP 1.7
« Die/setsockopt.pm ↑ Summary Die/socketpair.pm »
1 package IO::Die;
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 14 ▶sub socket {
Subroutine socket: called CC=2 SCAR=6.9
6 14 my ( $NS, $domain, $type, $protocol ) = ( shift, @_[ 1 .. $#_ ] );
7  
8 #https://github.com/pjcj/Devel--Cover/issues/125
9 #my ( $NS, $socket_r, $domain, $type, $protocol ) = ( shift, \shift, shift, shift, shift );
10  
11 14 local ( $!, $^E );
12 14 ▶ my $ok = CORE::socket( $_[0], $domain, $type, $protocol ) or do {
Branch: 1 branch
BranchTrueFalseTotal
my $ok = CORE::socket($_[0], $domain, $type, $protocol) or do { $NS->__THROW("SocketOpen", "domain", $domain, "type", $type, "protocol", $protocol) } 8 6 14
13 6 $NS->__THROW( 'SocketOpen', domain => $domain, type => $type, protocol => $protocol );
14 };
15  
16 8 return $ok;
17 }
18  
19 3 1;
« Die/setsockopt.pm ↑ Summary Die/socketpair.pm »