Condition Coverage

blib/lib/Atomic/Pipe.pm
Criterion Covered Total %
condition 115 225 51.1


and 2 conditions

line l !l condition
698 400058 0 $! == 28 and 0

and 3 conditions

line !l l&&!r l&&r condition
27 0 0 36 'POSIX'->can('PIPE_BUF') and eval { do { 4096 } }
34 0 0 36 'POSIX'->can('SSIZE_MAX') and eval { do { 9223372036854775807 } }
49 0 0 36 $can_thread &&= $] >= 5.008001
50 0 36 0 $can_thread &&= $Atomic::Pipe::Config{'useithreads'}
53 36 0 0 $can_thread and $] == 5.01
36 0 0 $can_thread and $] == 5.01 and $Atomic::Pipe::Config{'ccname'} eq 'gcc'
0 0 0 $can_thread and $] == 5.01 and $Atomic::Pipe::Config{'ccname'} eq 'gcc' and $Atomic::Pipe::Config{'gccversion'}
55 0 0 0 $parts[0] == 4 and $parts[1] >= 8
58 36 0 0 $can_thread &&= !$INC{'Devel/Cover.pm'}
162 1960 17024 781209 $self->{'in_buffer_size'} and $self->{'in_buffer_size'} >= $size
165 1 0 2 $params{'eof_invalid'} and $self->{'eof'}
343 78 24 0 $self->{'eof'} and keys %{$$self{'state'}{'buffers'};} || keys %{$$self{'state'}{'parts'};}
351 38 0 7 $self->{'eof'} and not $self->{'in_buffer_size'}
38 0 7 $self->{'eof'} and not $self->{'in_buffer_size'} and defined $line
0 0 7 $self->{'eof'} and not $self->{'in_buffer_size'} and defined $line and length $line
360 0 0 0 $self->{'eof'} and not $self->{'in_buffer_size'}
523 5 0 5 $self->{'rh'} and not $self->{'wh'}
0 0 5 $self->{'wh'} and not $self->{'rh'}
533 0 0 0 $r and $w
575 0 0 4 $self->{'rh'} and not $self->{'wh'}
581 0 0 4 $self->{'wh'} and not $self->{'rh'}
660 63 31 0 $self->{'out_buffer'} and @{$self->{'out_buffer'};}

or 2 conditions

line l !l condition
111 0 0 $self->{'read_size'} ||= 65536
123 19009 28 $self->{'in_buffer_size'} //= 0
125 0 19037 $self->{'read_size'} || 65536
204 4 0 fcntl($fh, 3, 0) // (return undef)
318 0 28 $self->{'burst_prefix'} //= "\cN"
319 0 28 $self->{'burst_postfix'} //= "\cO"
320 0 28 $self->{'message_key'} //= "\cP"
332 42 10 $self->{'mixed_buffer'} //= {'lines', '', 'burst', '', 'in_burst', 0, 'in_message', 0, 'do_extra_loop', 0, 'strip_term', 0}
370 10 0 $self->_get_from_buffer(1, 'eof_invalid', 'EOF before message terminator') // (return)
377 16 0 $self->_peek_from_buffer(1, 'eof_invalid', 'Incomplete burst data received before end of pipe') // (next)
386 6 0 $buffer->{'burst'} //= ''
433 0 0 $buffer->{$key} // ''
453 0 0 'Win32::API'->new('kernel32', 'PeekNamedPipe', 'NPIPPP', 'N') || die(q[Can't load PeekNamedPipe from kernel32.dll])
473 0 0 'Win32::API'->new('kernel32', 'SetNamedPipeHandleState', 'NPPP', 'N') || die(q[Can't load SetNamedPipeHandleState from kernel32.dll])
633 3 31 $_[0]{'burst_prefix'} // ''
3 31 $_[0]{'burst_postfix'} // ''
650 3 1 $self->fits_in_burst($data) // (return undef)
652 1 2 $self->{'out_buffer'} //= []
666 614134 100022 ($params{'blocking'} // $self->{'write_blocking'}) // 1
668 714156 0 $self->{'out_buffer'} // (return)
689 5 1298758 $self->{'burst_prefix'} // ''
690 5 1298758 $self->{'burst_postfix'} // ''
701 0 0 $wrote //= ''
713 2 30 $self->{'message_key'} // ''
714 2 30 $self->{'burst_prefix'} // ''
715 2 30 $self->{'burst_postfix'} // ''
726 2 100027 $self->{'message_key'} // ''
743 4 12 $self->{'out_buffer'} //= []
753 400021 20 $self->{'out_buffer'} //= []
775 100028 22 $self->{'state'} //= {}
788 400077 0 $self->_get_from_buffer($key->{'size'}, 'eof_invalid', 'EOF before end of message') // (return)
792 300034 100043 $state->{'parts'}{$tag} //= []

or 3 conditions

line l !l&&r !l&&!r condition
55 0 0 0 $parts[0] > 4 or $parts[0] == 4 and $parts[1] >= 8
104 3 3 0 $self->{'invalid_state'} //= @_ ? shift() : 'Unknown Error'
193 7 0 14 $buffer->{'lines'} or length $buffer->{'lines'}
194 0 0 14 $buffer->{'burst'} or length $buffer->{'burst'}
253 2 0 0 $class->_fh_mode($ifh) // croak(q[Could not determine filehandle mode, please specify '>&' or '<&'])
3 2 0 $mode //= $class->_fh_mode($ifh) // croak(q[Could not determine filehandle mode, please specify '>&' or '<&'])
254 5 0 0 $class->_mode_to_dir($mode) // croak("Invalid mode: $mode")
266 4 0 0 $class->_mode_to_dir($mode) // croak("Invalid mode: $mode")
326 52 0 0 $self->{'rh'} // croak('Not a read handle')
328 52 0 0 $self->{'burst_prefix'} // croak(q[missing 'burst_prefix', not in mixed_data_mode])
329 52 0 0 $self->{'burst_postfix'} // croak(q[missing 'burst_postfix', not in mixed_data_mode])
330 52 0 0 $self->{'message_key'} // croak(q[missing 'message_key', not in mixed_data_mode])
343 1 0 23 keys %{$$self{'state'}{'buffers'};} || keys %{$$self{'state'}{'parts'};}
345 59 0 42 $buffer->{'lines'} or length $buffer->{'lines'}
404 16 14 31 $self->{'in_buffer_size'} or $self->fill_buffer
453 0 0 0 $peek_named_pipe //= 'Win32::API'->new('kernel32', 'PeekNamedPipe', 'NPIPPP', 'N') || die(q[Can't load PeekNamedPipe from kernel32.dll])
473 0 0 0 $set_named_pipe_handle_state //= 'Win32::API'->new('kernel32', 'SetNamedPipeHandleState', 'NPPP', 'N') || die(q[Can't load SetNamedPipeHandleState from kernel32.dll])
534 0 0 0 $r or $w
541 0 0 0 $self->{'wh'} // $self->{'rh'}
550 3 0 0 $self->{'wh'} // $self->{'rh'}
563 0 0 0 $val || $ONE_MB
633 0 3 31 $_[0]{'delimiter_size'} //= &bytes::length(scalar($_[0]{'burst_prefix'} // '')) + &bytes::length(scalar($_[0]{'burst_postfix'} // ''))
640 2 1 1 $self->{'delimiter_size'} // $self->delimiter_size
666 0 3 714153 $params{'blocking'} // $self->{'write_blocking'}
674 684622 15 614127 $blocking or defined $got
692 5 0 1298758 length $prefix or length $postfix
698 898705 0 400058 $! == 11 or $! == 28 and 0
699 0 0 400058 not $wrote or $RETRY_ERRNO{0 + $!}
727 99997 32 0 $self->{'adjusted_dsize'} // $self->_adjusted_dsize
741 4 0 12 $self->{'delimiter_size'} // $self->delimiter_size
752 400021 2 18 $self->{'delimiter_size'} // $self->delimiter_size