| 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
| |||||||||||
| 10 | |||||||||||
| 11 | 678 | local ( $!, $^E ); | |||||||||
| 12 | 678 | my ( $nfound, $timeleft ) = CORE::select( $_[0], $_[1], $_[2], $timeout ); | |||||||||
| 13 | |||||||||||
| 14 | 678 | ▶ | if ($^E) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | 4 | $NS->__THROW('Select'); | |||||||||
| 16 | } | ||||||||||
| 17 | |||||||||||
| 18 | 674 | ▶ | return wantarray ? ( $nfound, $timeleft ) : $nfound; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | 4 | 1; | |||||||||