| 1 | package IO::Die; | ||||||||||
| 2 | |||||||||||
| 3 | 3 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 6 | ▶ | sub send { | ||||||||
|
Subroutine
send: called CC=3 SCAR=11.1
| |||||||||||
| 6 | 6 | my ( $NS, $socket, $flags, $to ) = ( shift, shift, @_[ 1 .. $#_ ] ); | |||||||||
| 7 | |||||||||||
| 8 | #https://github.com/pjcj/Devel--Cover/issues/125 | ||||||||||
| 9 | #my ( $NS, $socket, $msg_r, $flags, $to ) = ( shift, shift, \shift, @_ ); | ||||||||||
| 10 | |||||||||||
| 11 | 6 | local ( $!, $^E ); | |||||||||
| 12 | 6 | my $res; | |||||||||
| 13 | 6 | ▶ | if ( defined $to ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | 0 | $res = CORE::send( $socket, $_[0], $flags, $to ); | |||||||||
| 15 | } | ||||||||||
| 16 | else { | ||||||||||
| 17 | 6 | $res = CORE::send( $socket, $_[0], $flags ); | |||||||||
| 18 | } | ||||||||||
| 19 | |||||||||||
| 20 | 6 | ▶ | if ( !defined $res ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | 3 | $NS->__THROW( 'SocketSend', length => length( $_[0] ), flags => $flags ); | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 3 | return $res; | |||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | 3 | 1; | |||||||||