File Coverage

blib/lib/MsgPack/RPC/Event/Receive.pm
Criterion Covered Total %
statement 7 7 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod 0 2 0.0
total 10 12 83.3


line stmt bran cond sub pod time code
1             package MsgPack::RPC::Event::Receive;
2             our $AUTHORITY = 'cpan:YANICK';
3             $MsgPack::RPC::Event::Receive::VERSION = '2.0.2';
4 2     2   15 use Moose;
  2         4  
  2         17  
5              
6             extends 'Beam::Event';
7              
8             has message => (
9             is => 'ro',
10             required => 1,
11             handles => [ qw/ id is_request is_response is_notification params method all_params / ],
12             );
13              
14             sub resp {
15 2     2 0 101 my $self = shift;
16              
17 2         28 $self->emitter->send_response( $self->id, shift );
18             }
19              
20             sub error {
21 1     1 0 47 my $self = shift;
22              
23 1         8 $self->emitter->send_response_error( $self->id, shift );
24             }
25              
26             1;
27              
28             __END__
29              
30             =pod
31              
32             =encoding UTF-8
33              
34             =head1 NAME
35              
36             MsgPack::RPC::Event::Receive
37              
38             =head1 VERSION
39              
40             version 2.0.2
41              
42             =head1 AUTHOR
43              
44             Yanick Champoux <yanick@cpan.org>
45              
46             =head1 COPYRIGHT AND LICENSE
47              
48             This software is copyright (c) 2019, 2017, 2016, 2015 by Yanick Champoux.
49              
50             This is free software; you can redistribute it and/or modify it under
51             the same terms as the Perl 5 programming language system itself.
52              
53             =cut