blib/lib/IO/SigGuard/syswrite.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 2 | 2 | 100.0 |
branch | n/a | ||
condition | 1 | 3 | 33.3 |
subroutine | 1 | 1 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 4 | 7 | 57.1 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package IO::SigGuard; | ||||||
2 | |||||||
3 | sub syswrite { | ||||||
4 | 643103 | 33 | 643103 | 0 | 5843619 | $result = ( (@_ == 2) ? CORE::syswrite( $_[0], $_[1] ) : (@_ == 3) ? CORE::syswrite( $_[0], $_[1], $_[2] ) : (@_ == 4) ? CORE::syswrite( $_[0], $_[1], $_[2], $_[3] ) : die "Wrong args count! syswrite(@_)" ) || do { | |
5 | |||||||
6 | #EINTR means the file pointer is unchanged. | ||||||
7 | goto &syswrite if $! == Errno::EINTR(); | ||||||
8 | }; | ||||||
9 | |||||||
10 | 643103 | 1642265 | return $result; | ||||
11 | } | ||||||
12 | |||||||
13 | 1; |