File Coverage

blib/lib/IPC/Manager/Base/FS/Handle.pm
Criterion Covered Total %
statement 28 31 90.3
branch 7 14 50.0
condition n/a
subroutine 7 8 87.5
pod 0 3 0.0
total 42 56 75.0


line stmt bran cond sub pod time code
1             package IPC::Manager::Base::FS::Handle;
2 1     1   705 use strict;
  1         4  
  1         43  
3 1     1   6 use warnings;
  1         3  
  1         137  
4              
5             our $VERSION = '0.000005';
6              
7 1     1   8 use Carp qw/croak/;
  1         2  
  1         66  
8              
9 1     1   6 use parent 'IPC::Manager::Base::FS';
  1         2  
  1         8  
10 1         6 use Object::HashBase qw{
11             +buffer
12 1     1   66 };
  1         2  
13              
14 0     0 0 0 sub fill_buffer { croak "Not Implemented" }
15              
16             sub pending_messages {
17 9     9 0 19 my $self = shift;
18              
19 9         27 $self->pid_check;
20              
21 9 50       27 return 1 if $self->have_resume_file;
22 9 50       19 return 1 if @{$self->{+BUFFER}};
  9         27  
23 9 100       28 return 1 if $self->select->can_read(0);
24              
25 6         111 return 0;
26             }
27              
28             sub ready_messages {
29 3     3 0 6 my $self = shift;
30              
31 3         11 $self->pid_check;
32              
33 3 50       7 return 1 if $self->have_resume_file;
34 3 50       7 return 1 if @{$self->{+BUFFER}};
  3         10  
35              
36 3 50       7 return 0 unless $self->pending_messages;
37              
38 0 0         return 1 if $self->fill_buffer;
39              
40 0           return 0;
41             }
42              
43             1;