| 1 | package IPC::Manager::Base::FS::Handle; | ||||||||||||||||||||
| 2 | 88 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 88 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | 88 | our $VERSION = '0.000035'; | |||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 88 | ▶ | use Carp qw/croak/; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | 88 | ▶ | use parent 'IPC::Manager::Base::FS'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 10 | 88 | use Object::HashBase qw{ | |||||||||||||||||||
| 11 | +buffer | ||||||||||||||||||||
| 12 | 88 | ▶ | }; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 1 | ▶ | sub fill_buffer { croak "Not Implemented" } | ||||||||||||||||||
|
Subroutine
fill_buffer: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | sub pending_messages { | ||||||||||||||||||||
| 17 | 225 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
pending_messages: called CC=7 SCAR=19.5
Pod
documented
| |||||||||||||||||||||
| 18 | |||||||||||||||||||||
| 19 | 225 | $self->pid_check; | |||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | 224 | ▶ | return 1 if $self->have_resume_file; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 22 | 222 | ▶ | return 1 if @{$self->{+BUFFER} // []}; | ||||||||||||||||||
|
Branch: 1 branch
Condition50%1/2
$self->{"buffer"} // []
MC/DC0%0/1
$self->{"buffer"} // []
$self->{"buffer"}
Truth table50%1/2
A
A= $self->{"buffer"}
| |||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 220 | ▶ | if ($self->can_select) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 25 | 212 | ▶ | return 1 if $self->select->can_read(0); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 26 | } | ||||||||||||||||||||
| 27 | else { | ||||||||||||||||||||
| 28 | 8 | ▶ | return 1 if $self->fill_buffer; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 29 | } | ||||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | 209 | return 0; | |||||||||||||||||||
| 32 | } | ||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | sub ready_messages { | ||||||||||||||||||||
| 35 | 116 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
ready_messages: called CC=6 SCAR=18.2
Pod
documented
| |||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | 116 | $self->pid_check; | |||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | 115 | ▶ | return 1 if $self->have_resume_file; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 40 | 113 | ▶ | return 1 if @{$self->{+BUFFER} // []}; | ||||||||||||||||||
|
Branch: 1 branch
Condition50%1/2
$self->{"buffer"} // []
MC/DC0%0/1
$self->{"buffer"} // []
$self->{"buffer"}
Truth table50%1/2
A
A= $self->{"buffer"}
| |||||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | 111 | ▶ | return 0 unless $self->pending_messages; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | 6 | ▶ | return 1 if $self->fill_buffer; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 45 | |||||||||||||||||||||
| 46 | 0 | return 0; | |||||||||||||||||||
| 47 | } | ||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | 88 | 1; | |||||||||||||||||||
| 50 | |||||||||||||||||||||
| 51 | __END__ | ||||||||||||||||||||