blib/lib/Dallycot/Channel.pm untested

filter: Statementstmt 0.0% 0 / 19 Branchbran n/a Conditioncond 0.0% 0 / 6 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 36 CC 1 SCAR 6.9
CC
1
Cov
0%
can_send
2.0
can_receive
2.0
send_data
2.0
CRAP 2.0
1 package Dallycot::Channel;
2 our $AUTHORITY = 'cpan:JSMITH';
3  
4 # ABSTRACT: i/o channel base class
5  
6 use utf8;
7 use Moose;
8 use Carp qw(croak);
9  
10 sub can_send {return}
11 sub can_receive {return}
12  
13 sub send_data {
14 my ( $self, @content ) = @_;
15  
16 # This needs to be written for an output channel
17 my $class = ref $self || $self;
18 croak "send() is not implemented for $class";
19 }
20  
21 sub receive_data {
22 my ($self) = @_;
23  
24 # This also needs to be written for an input channel
25 # should return a promise that will be fulfilled with the
26 # input when it arrives
27 my $class = ref $self || $self;
28 croak "receive() is not implemented for $class";
29 }
30  
31 __PACKAGE__ -> meta -> make_immutable;
32  
33 1;